compilation error in etree.c with python 3.11

Bug #1976532 reported by Laurent Nicolas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Low
scoder

Bug Description

This issue is seen with python 3.11.
Some googling suggests that the version of cython may need to be updated.

src/lxml/etree.c:265439:14: error: dereferencing pointer to incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}

Collecting lxml
  Downloading lxml-4.8.0.tar.gz (3.2 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'

  Building wheel for lxml (setup.py): started
  Building wheel for lxml (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.11 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qsynd35b/lxml_18b347b16c714608b56cbfd77d7984f6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qsynd35b/lxml_18b347b16c714608b56cbfd77d7984f6/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-k09g8t_2
       cwd: /tmp/pip-install-qsynd35b/lxml_18b347b16c714608b56cbfd77d7984f6/
  Complete output (14 lines):
  Building lxml version 4.8.0.
  Building without Cython.
  Building against libxml2 2.9.10 and libxslt 1.1.34
  running bdist_wheel
  running build
  running build_py
  running build_ext
  building 'lxml.etree' extension
  src/lxml/etree.c: In function ‘__Pyx_Coroutine_SendEx’:
  src/lxml/etree.c:265439:14: error: dereferencing pointer to incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
  265439 | f->f_back = PyThreadState_GetFrame(tstate);
         | ^~
  Compile failed: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

scoder (scoder)
Changed in lxml:
milestone: none → 4.9.0
assignee: nobody → scoder (scoder)
importance: Undecided → Low
status: New → Fix Released
Revision history for this message
Laurent Nicolas (lonico77) wrote :

thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.