[issue1263] PEP 3137 patch - str8/str comparison should return false

Guido van Rossum report at bugs.python.org
Mon Oct 15 19:31:28 CEST 2007


Guido van Rossum added the comment:

I'll look at this at some point. One quick comment: the lnotab and bytecode
should use PyString, which will be 'bytes' in 3.0a2. They must be immutable
because code objects must be immutable (it must not be possible to modify an
existing code object).

On 10/15/07, Thomas Lee <report at bugs.python.org> wrote:
>
>
> Thomas Lee added the comment:
>
> Hack to make Python/codecs.c use Unicode strings internally. I recognize
> the way I have fixed it here is probably not ideal (basically ripped out
> PyString_*, replaced with a PyMem_Malloc/PyMem_Free call) but it fixes
> 10-12 tests that were failing with my earlier changes. If anybody can
> recommend a "nice" way to fix this, I'm all ears.
>
> The following still fail for me with this patch applied:
>
> -- test_compile
>
> This is due to PyString_*/PyUnicode_*/PyBytes_* confusion in the
> assembler struct (specifically: a_lnotab and a_bytecode) in
> Python/compile.c - tried replacing PyString_* calls with PyBytes_*
> calls, but this raises a TypeError because PyBytes is not hashable ...
> not sure what exactly is causing this.
>
> -- test_ctypes
> Looks like a simple case of ctypes using str8 instead of str. Appears to
> be an easy fix.
>
> -- test_modulefinder
> Failing because str8 >= str is now an invalid operation
>
> -- test_set
> This test needs some love.
>
> -- test_sqlite
> Not sure what's going on here.
>
> -- test_str
>
> This one is a little tricky: str8/str with __str__/__unicode__ ... how
> is this test supposed to behave with the fix in this patch?
>
> -- test_struct
> "unpack/pack not transitive" - what does that mean?
>
> -- test_subprocess
> Like modulefinder, this is probably just due to the use of str8 over str
> internally in the subprocess module. Likely to be an easy fix.
>
> The following tests fail for me irrespective of whether or not I have r4
> of my patch applied:
>
> -- test_doctest
> -- test_email
> -- test_nis
> -- test_pty
>
> If anybody can give this new patch a try and let me know the result it
> would be much appreciated.
>
> __________________________________
> Tracker <report at bugs.python.org>
> <http://bugs.python.org/issue1263>
> __________________________________
>

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1263>
__________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unnamed
Url: http://mail.python.org/pipermail/python-bugs-list/attachments/20071015/29bf8825/attachment-0001.txt 


More information about the Python-bugs-list mailing list