Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependencies: bump lxml <5 version constraint for Python 3.12 #5336

Closed
bastimeyer opened this issue May 12, 2023 · 2 comments · Fixed by #5342
Closed

dependencies: bump lxml <5 version constraint for Python 3.12 #5336

bastimeyer opened this issue May 12, 2023 · 2 comments · Fixed by #5342

Comments

@bastimeyer
Copy link
Member

The first beta release of Python 3.12 will be out on 2023-05-22:
https://peps.python.org/pep-0693/

lxml wheels for Python 3.12 are not available yet though, and building lxml from the 4.9.2 sdist published on PyPI (latest stable release) results in an error. See down below...

This error has been fixed on their master branch, but they also bumped the major version. This means that once Python 3.12 gets released, Streamlink will have to lift the <5 version constraint of lxml:

lxml >=4.6.4,<5.0

lxml's 5.0.0 changelog so far:
https://github.com/lxml/lxml/blob/master/CHANGES.txt


Building from the 4.9.2 sdist fails, regardless the installed cython version, as the build process ignores it:

$ pip install --force-reinstall --no-binary=lxml lxml
Collecting lxml
  Using cached lxml-4.9.2.tar.gz (3.7 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: lxml
  Building wheel for lxml (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [199 lines of output]
      /tmp/pip-install-7iml45pd/lxml_e8df92a030564c2d9f3f9a08c641f97c/setup.py:117: SyntaxWarning: invalid escape sequence '\.'
        is_interesting_header = re.compile('^(zconf|zlib|.*charset)\.h$').match
      Building lxml version 4.9.2.
      Building without Cython.
      Building against libxml2 2.10.4 and libxslt 1.1.37
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      creating build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/sax.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/cssselect.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/builder.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/__init__.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-cpython-312/lxml
      creating build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-cpython-312/lxml/includes
      creating build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/diff.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/defs.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/clean.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/builder.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron
      copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron
      copying src/lxml/etree.h -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/etree_api.h -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/objectify.pyx -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/etree.pyx -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xsltext.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xslt.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xpath.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xmlschema.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xmlid.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xmlerror.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xinclude.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/serializer.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/schematron.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/saxparser.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/relaxng.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/readonlytree.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/public-api.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/proxy.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/parsertarget.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/parser.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/objectpath.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/nsclasses.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/iterparse.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/extensions.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/dtd.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/docloader.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/debug.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/cleanup.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/classlookup.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/apihelpers.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/__init__.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-cpython-312/lxml/includes
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/rng
      copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/rng
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl
      copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl
      copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      running build_ext
      building 'lxml.etree' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/src
      creating build/temp.linux-x86_64-cpython-312/src/lxml
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/home/basti/venv/streamlink-312/include -I/usr/include/python3.12 -c src/lxml/etree.c -o build/temp.linux-x86_64-cpython-312/src/lxml/etree.o -w
      src/lxml/etree.c: In function ‘__Pyx_Raise’:
      src/lxml/etree.c:262394:34: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
      262394 |         PyObject* tmp_tb = tstate->curexc_traceback;
             |                                  ^~
      src/lxml/etree.c:262397:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
      262397 |             tstate->curexc_traceback = tb;
             |                   ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_AddObjC’:
      src/lxml/etree.c:263340:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      263340 |         const digit* digits = ((PyLongObject*)op1)->ob_digit;
             |                                                   ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_EqObjC’:
      src/lxml/etree.c:263457:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      263457 |         const digit* digits = ((PyLongObject*)op1)->ob_digit;
             |                                                   ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_SubtractObjC’:
      src/lxml/etree.c:265182:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      265182 |         const digit* digits = ((PyLongObject*)op1)->ob_digit;
             |                                                   ^~
      src/lxml/etree.c: In function ‘__Pyx__Coroutine_GetAwaitableIter’:
      src/lxml/etree.c:267536:53: error: ‘PyGenObject’ has no member named ‘gi_code’
      267536 |     if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) {
             |                                                     ^~
      src/lxml/etree.c:267536:102: error: ‘PyGenObject’ has no member named ‘gi_code’
      267536 |     if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) {
             |                                                                                                      ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_int’:
      src/lxml/etree.c:268588:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      268588 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:268643:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      268643 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_size_t’:
      src/lxml/etree.c:268897:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      268897 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:268952:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      268952 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_unsigned_int’:
      src/lxml/etree.c:269093:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269093 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:269148:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269148 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_signed__char’:
      src/lxml/etree.c:269289:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269289 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:269344:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269344 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_unsigned_short’:
      src/lxml/etree.c:269523:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269523 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:269578:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269578 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_xmlChar’:
      src/lxml/etree.c:269757:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269757 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:269812:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269812 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_long’:
      src/lxml/etree.c:269960:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269960 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:270015:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      270015 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyIndex_AsSsize_t’:
      src/lxml/etree.c:270403:45: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      270403 |     const digit* digits = ((PyLongObject*)b)->ob_digit;
             |                                             ^~
      Compile failed: command '/usr/bin/gcc' failed with exit code 1
      creating tmp
      cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitmbdnda7l.c -o tmp/xmlXPathInitmbdnda7l.o
      /tmp/xmlXPathInitmbdnda7l.c: In function ‘main’:
      /tmp/xmlXPathInitmbdnda7l.c:3:5: warning: ‘xmlXPathInit’ is deprecated [-Wdeprecated-declarations]
          3 |     xmlXPathInit();
            |     ^~~~~~~~~~~~
      In file included from /tmp/xmlXPathInitmbdnda7l.c:1:
      /usr/include/libxml2/libxml/xpath.h:564:21: note: declared here
        564 |                     xmlXPathInit                (void);
            |                     ^~~~~~~~~~~~
      cc tmp/xmlXPathInitmbdnda7l.o -lxml2 -o a.out
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lxml
  Running setup.py clean for lxml
Failed to build lxml

Building from git (lxml-4.9.2 or master) works when the right cython version is installed:

$ pip show cython
Name: Cython
Version: 0.29.34
Summary: The Cython compiler for writing C extensions for the Python language.
Home-page: http://cython.org/
Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.
Author-email: cython-devel@python.org
License: Apache
Location: /home/basti/venv/streamlink-312/lib/python3.12/site-packages
Requires: 
Required-by:

$ pip install --force-reinstall --no-binary=lxml git+https://github.com/lxml/lxml.git@lxml-4.9.2
Collecting git+https://github.com/lxml/lxml.git@lxml-4.9.2
  Cloning https://github.com/lxml/lxml.git (to revision lxml-4.9.2) to /tmp/pip-req-build-kwfvd3eo
  Running command git clone --filter=blob:none --quiet https://github.com/lxml/lxml.git /tmp/pip-req-build-kwfvd3eo
  Running command git checkout -q a88cad529ce573ebcfb97a8df7f50f1b1e5ae91e
  Resolved https://github.com/lxml/lxml.git to commit a88cad529ce573ebcfb97a8df7f50f1b1e5ae91e
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: lxml
  Building wheel for lxml (setup.py) ... done
  Created wheel for lxml: filename=lxml-4.9.2-cp312-cp312-linux_x86_64.whl size=7261306 sha256=c62fc30408b75e5a73a6890e25edaa922e9f4e0f35c69f2e439952d2fb45a5ba
  Stored in directory: /tmp/pip-ephem-wheel-cache-t2zexv37/wheels/84/6c/72/1cc11ab06a7f70948cd0fdbed44c2b0cee28ef01bdb2367384
Successfully built lxml
Installing collected packages: lxml
  Attempting uninstall: lxml
    Found existing installation: lxml 5.0.0a0
    Uninstalling lxml-5.0.0a0:
      Successfully uninstalled lxml-5.0.0a0
Successfully installed lxml-4.9.2

However, when cython <0.29.34 is installed, this results in the same error as above:

$ pip show cython
Name: Cython
Version: 0.29.33
Summary: The Cython compiler for writing C extensions for the Python language.
Home-page: http://cython.org/
Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.
Author-email: cython-devel@python.org
License: Apache
Location: /home/basti/venv/streamlink-312/lib/python3.12/site-packages
Requires: 
Required-by:

$ pip install --force-reinstall --no-binary=lxml git+https://github.com/lxml/lxml.git@lxml-4.9.2
Collecting git+https://github.com/lxml/lxml.git@lxml-4.9.2
  Cloning https://github.com/lxml/lxml.git (to revision lxml-4.9.2) to /tmp/pip-req-build-z0zqsxyj
  Running command git clone --filter=blob:none --quiet https://github.com/lxml/lxml.git /tmp/pip-req-build-z0zqsxyj
  Running command git checkout -q a88cad529ce573ebcfb97a8df7f50f1b1e5ae91e
  Resolved https://github.com/lxml/lxml.git to commit a88cad529ce573ebcfb97a8df7f50f1b1e5ae91e
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: lxml
  Building wheel for lxml (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [199 lines of output]
      /tmp/pip-req-build-z0zqsxyj/setup.py:117: SyntaxWarning: invalid escape sequence '\.'
        is_interesting_header = re.compile('^(zconf|zlib|.*charset)\.h$').match
      Building lxml version 4.9.2.
      Building without Cython.
      Building against libxml2 2.10.4 and libxslt 1.1.37
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      creating build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/cssselect.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/__init__.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/sax.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/builder.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-cpython-312/lxml
      creating build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-cpython-312/lxml/includes
      creating build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/diff.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/defs.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/clean.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/builder.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-cpython-312/lxml/html
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron
      copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron
      copying src/lxml/etree.h -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/etree_api.h -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/objectify.pyx -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/etree.pyx -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xpath.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xmlerror.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/serializer.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/saxparser.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/parser.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/extensions.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xsltext.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xslt.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xmlschema.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xmlid.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/xinclude.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/schematron.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/relaxng.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/readonlytree.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/public-api.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/proxy.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/parsertarget.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/objectpath.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/nsclasses.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/iterparse.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/dtd.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/docloader.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/debug.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/cleanup.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/classlookup.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/apihelpers.pxi -> build/lib.linux-x86_64-cpython-312/lxml
      copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/__init__.pxd -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-cpython-312/lxml/includes
      copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-cpython-312/lxml/includes
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/rng
      copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/rng
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl
      copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl
      copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl
      creating build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-cpython-312/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
      running build_ext
      building 'lxml.etree' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/src
      creating build/temp.linux-x86_64-cpython-312/src/lxml
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/home/basti/venv/streamlink-312/include -I/usr/include/python3.12 -c src/lxml/etree.c -o build/temp.linux-x86_64-cpython-312/src/lxml/etree.o -w
      src/lxml/etree.c: In function ‘__Pyx_Raise’:
      src/lxml/etree.c:262397:34: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
      262397 |         PyObject* tmp_tb = tstate->curexc_traceback;
             |                                  ^~
      src/lxml/etree.c:262400:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
      262400 |             tstate->curexc_traceback = tb;
             |                   ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_AddObjC’:
      src/lxml/etree.c:263341:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      263341 |         const digit* digits = ((PyLongObject*)op1)->ob_digit;
             |                                                   ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_EqObjC’:
      src/lxml/etree.c:263458:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      263458 |         const digit* digits = ((PyLongObject*)op1)->ob_digit;
             |                                                   ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_SubtractObjC’:
      src/lxml/etree.c:265181:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      265181 |         const digit* digits = ((PyLongObject*)op1)->ob_digit;
             |                                                   ^~
      src/lxml/etree.c: In function ‘__Pyx__Coroutine_GetAwaitableIter’:
      src/lxml/etree.c:267540:53: error: ‘PyGenObject’ has no member named ‘gi_code’
      267540 |     if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) {
             |                                                     ^~
      src/lxml/etree.c:267540:102: error: ‘PyGenObject’ has no member named ‘gi_code’
      267540 |     if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) {
             |                                                                                                      ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_int’:
      src/lxml/etree.c:268592:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      268592 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:268647:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      268647 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_size_t’:
      src/lxml/etree.c:268901:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      268901 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:268956:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      268956 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_unsigned_int’:
      src/lxml/etree.c:269097:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269097 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:269152:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269152 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_signed__char’:
      src/lxml/etree.c:269293:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269293 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:269348:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269348 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_unsigned_short’:
      src/lxml/etree.c:269527:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269527 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:269582:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269582 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_xmlChar’:
      src/lxml/etree.c:269761:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269761 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:269816:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269816 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyInt_As_long’:
      src/lxml/etree.c:269964:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      269964 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c:270019:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      270019 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
             |                                                     ^~
      src/lxml/etree.c: In function ‘__Pyx_PyIndex_AsSsize_t’:
      src/lxml/etree.c:270407:45: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      270407 |     const digit* digits = ((PyLongObject*)b)->ob_digit;
             |                                             ^~
      Compile failed: command '/usr/bin/gcc' failed with exit code 1
      creating tmp
      cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitooopc9a_.c -o tmp/xmlXPathInitooopc9a_.o
      /tmp/xmlXPathInitooopc9a_.c: In function ‘main’:
      /tmp/xmlXPathInitooopc9a_.c:3:5: warning: ‘xmlXPathInit’ is deprecated [-Wdeprecated-declarations]
          3 |     xmlXPathInit();
            |     ^~~~~~~~~~~~
      In file included from /tmp/xmlXPathInitooopc9a_.c:1:
      /usr/include/libxml2/libxml/xpath.h:564:21: note: declared here
        564 |                     xmlXPathInit                (void);
            |                     ^~~~~~~~~~~~
      cc tmp/xmlXPathInitooopc9a_.o -lxml2 -o a.out
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lxml
  Running setup.py clean for lxml
Failed to build lxml
@gravyboat
Copy link
Member

I'm fine with this. Since we have no statistical data to say who is using what I don't see any reason to inconvenience or hold back development for the sake of supporting older releases. People will have to upgrade.

@bastimeyer
Copy link
Member Author

There's nothing to agree about. This thread is a simple note (for myself) to not forget to bump lxml's upper version constraint once py312 enters beta. Simple dependency management... lxml 4.x still is and will be fine on <=py311. No one has to upgrade anything here. The only thing relevant for Streamlink is checking whether there will be other incompabilities in lxml's 5.0.0 release which need changes here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants