Edgewall Software

Ticket #555 (new defect)

Opened 17 months ago

Last modified 5 months ago

genshi._speedups extension module incompatible with CPython >=3.3

Reported by: Arfrever.FTA@… Owned by: hodgestar
Priority: major Milestone: 0.8
Component: General Version: devel
Keywords: Cc: Arfrever.FTA@…

Description

genshi._speedups extension module is incompatible with CPython >=3.3 due to  changes in unicode implementation in CPython 3.3. Genshi should use appropriate functions or macros (e.g. PyUnicode?_GetLength()) instead of no longer available private members of PyUnicodeObject? structures.

$ python3.3 setup.py build
...
running build_ext
building 'genshi._speedups' extension
creating build/temp.linux-x86_64-3.3
creating build/temp.linux-x86_64-3.3/genshi
x86_64-pc-linux-gnu-gcc -pthread -fPIC -I/usr/include/python3.3 -c genshi/_speedups.c -o build/temp.linux-x86_64-3.3/genshi/_speedups.o
genshi/_speedups.c: In function ‘escape’:
genshi/_speedups.c:89:13: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:90:24: error: ‘PyUnicodeObject’ has no member named ‘length’
genshi/_speedups.c:90:43: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:120:13: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:121:15: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:122:24: error: ‘PyUnicodeObject’ has no member named ‘length’
genshi/_speedups.c:122:43: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:125:13: error: ‘PyUnicodeObject’ has no member named ‘length’
genshi/_speedups.c:125:13: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:130:17: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:136:21: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:144:17: error: ‘PyUnicodeObject’ has no member named ‘str’
genshi/_speedups.c:149:17: error: ‘PyUnicodeObject’ has no member named ‘str’
**********************************************************************
WARNING:
An optional C extension could not be compiled, speedups will not be
available.
**********************************************************************
command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1

Attachments

Change History

Changed 15 months ago by hodgestar

  • owner changed from cmlenz to hodgestar

This is going to require a complete re-write of the escape function in _speedups.c so it's going to take awhile to get to.

Changed 5 months ago by hodgestar

For the moment I've disabled the C extension by default in setup.py when the CPython version is >= 3.3.

Add/Change #555 (genshi._speedups extension module incompatible with CPython >=3.3)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from hodgestar. Next status will be 'new'
The owner will change from hodgestar to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.