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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, serhiy.storchaka
Date 2013-05-14.23:27:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368574020.99.0.834797445108.issue17979@psf.upfronthosting.co.za>
In-reply-to
Content
python2.7 can't be compiled with --enable-unicode=no
Because of a crash in the re module. It's a regression from 2.7.3.

$ ./python -c 'import re; re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/amauryfa/python/cpython2.7/Lib/re.py", line 190, in compile
    return _compile(pattern, flags)
  File "/home/amauryfa/python/cpython2.7/Lib/re.py", line 240, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/home/amauryfa/python/cpython2.7/Lib/sre_compile.py", line 533, in compile
    groupindex, indexgroup
RuntimeError: invalid SRE code


The cause is in sre.h: when Py_USING_UNICODE is false, SRE_CODE is defined as "unsigned long" instead of "unsigned short"!

When this is fixed, the following modules did not compile:
_io _json _sqlite3 _ssl _testcapi
Which modules are supposed to work without unicode?
History
Date User Action Args
2013-05-14 23:27:01amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, serhiy.storchaka
2013-05-14 23:27:00amaury.forgeotdarcsetmessageid: <1368574020.99.0.834797445108.issue17979@psf.upfronthosting.co.za>
2013-05-14 23:27:00amaury.forgeotdarclinkissue17979 messages
2013-05-14 23:27:00amaury.forgeotdarccreate