lxml with python-3.12.0a5

Mats Wichmann mats at wichmann.us
Thu Feb 23 13:09:29 EST 2023


On 2/23/23 07:47, Mats Wichmann wrote:
> On 2/23/23 06:03, Robin Becker wrote:
>> I'm trying to test python-3.12.0a5 and need to install lxml.
>>
>> My wheel build for lxml fails with errors like this
>>
>>
>> src/lxml/etree.c: In function ‘__Pyx_PyIndex_AsSsize_t’:
>> src/lxml/etree.c:270404:45: error: ‘PyLongObject’ {aka ‘struct 
>> _longobject’} has no member named ‘ob_digit’
>> 270404 |     const digit* digits = ((PyLongObject*)b)->ob_digit;
>>         |                                             ^~
>>
>> I'm using archlinux which has gcc 12.2.1. I tested and lxml will build 
>> with 3.11.2.
>>
>> I imagine this is part of ongoing changes to the python core, but 
>> perhaps there's some simple workaround.
>>
>> Anyone know how to get around this problem. I did try rebuilding the 
>> cpython stuff using make, but that also failed.
> 
> I seem to always have trouble with lxml (which I know doesn't help).
> 
> The cause would seem to be this:
> 
>      GH-101291: Refactor the `PyLongObject` struct into object header 
> and PyLongValue struct. (GH-101292)

So it looks to me like cython was affected, and has patched themselves. 
It's possible regenerating with a patched cython will clear up the build 
problem (something which the lxml project takes pains to tell you that 
you don't really want to do :)


More information about the Python-list mailing list