This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thomaslee
Recipients gvanrossum, thomaslee
Date 2007-10-15.13:01:34
SpamBayes Score 0.017027061
Marked as misclassified No
Message-id <1192453296.61.0.335767716616.issue1263@psf.upfronthosting.co.za>
In-reply-to
Content
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.
Files
File name Uploaded
unicode-string-eq-false-all-r4.patch thomaslee, 2007-10-15.13:01:35
History
Date User Action Args
2007-10-15 13:01:37thomasleesetspambayes_score: 0.0170271 -> 0.017027061
recipients: + thomaslee, gvanrossum
2007-10-15 13:01:36thomasleesetspambayes_score: 0.0170271 -> 0.0170271
messageid: <1192453296.61.0.335767716616.issue1263@psf.upfronthosting.co.za>
2007-10-15 13:01:36thomasleelinkissue1263 messages
2007-10-15 13:01:35thomasleecreate