]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Make str/str8 comparisons return True/False for !=/==.
authorBrett Cannon <bcannon@gmail.com>
Mon, 22 Oct 2007 20:24:51 +0000 (20:24 +0000)
committerBrett Cannon <bcannon@gmail.com>
Mon, 22 Oct 2007 20:24:51 +0000 (20:24 +0000)
commit4043001f5d84d4919781e34221449047d0690ac8
tree4b4db9f0b748407480aff4f10b99ce70548bfee0
parent6464d471950c6ee109f82597ff70d755c127074f
Make str/str8 comparisons return True/False for !=/==.

Code that has been returning str8 becomes much more apparent thanks to this
(e.g., struct module returning str8 for all string-related formats or sqlite3
passing in str8 instances when converting objects that had a __conform__
method).  One also has to watch out in C code when making a key from char *
using PyString in the C code but a str instance in Python code as that will not
longer compare equal.

Once str8 gains a constructor like the current bytes type then
test_modulefinder needs a cleanup as the fix is a little messy in that file.

Thanks goes to Thomas Lee for writing the patch for the change giving an
initial run-down of why most of the tests were failing.
Lib/modulefinder.py
Lib/sqlite3/test/types.py
Lib/test/test_compile.py
Lib/test/test_format.py
Lib/test/test_str.py
Lib/test/test_struct.py
Lib/test/test_subprocess.py
Lib/test/test_unicode.py
Misc/NEWS
Modules/_sqlite/cursor.c
Objects/unicodeobject.c