[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2021-05-21 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2021-05-21 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-11-15 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 3.0 -> 4.0
pull_requests: +22203
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23312

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-25 Thread zihengCat


zihengCat  added the comment:

Does it mean modify `cpython/Modules/_sre.c` and add `PyObject` information to 
PyError string ?

https://github.com/python/cpython/blob/master/Modules/_sre.c#L376

--
nosy: +zihengcat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-25 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I already started one actually. But if I don't get to it in a week, I'll make a 
note here and you can take it up.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-25 Thread Ido Michael


Ido Michael  added the comment:

I agree it should be more informative and have the same standard as the rest of 
the Errors messages.

Can I start a PR?

--
nosy: +Ido Michael

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-22 Thread Chris Jerdonek


New submission from Chris Jerdonek :

This TypeError could be a bit better:

"/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", 
line 293, in test_with_statement
if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason):
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/re.py", line 
201, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object

It just says "expected string or bytes-like object" but could include what type 
it found.

--
components: Library (Lib)
messages: 369652
nosy: chris.jerdonek
priority: normal
severity: normal
status: open
title: better message for re.search TypeError ("expected string or bytes-like 
object")
type: enhancement
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com