pip install lxml fails on Python 3.8 prerelease builds

Bug #1829853 reported by Marius Gedminas
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Low
scoder

Bug Description

Python 3.8 changed the C API a bit (specifically, PyCode_New() gets an extra argument to indicate the number of positional-only arguments, IIRC). This broke Cython and all packages that rely on Cython.

The Cython bug is here: https://github.com/cython/cython/issues/2938. When it's fixed, all packages using Cython that ship pre-generated C files in their PyPI release tarballs will have to re-generate them to support Python 3.8.

(When I started filing this bug I was under the mistaken impression that a fixed Cython was already published to PyPI and all that was left to do was to do the re-generation. That turns out not to be the case. I'll leave this bug as a heads up.)

Revision history for this message
Marius Gedminas (mgedmin) wrote :

(A double fail award goes to me for not realizing cython and lxml share maintainers so they don't need to be told about this situation! Oops.)

Revision history for this message
Jad Chaar (jc713) wrote :

Hey Marius, I am having this issue as well. Will it require a new lxml release? Or how can I go about fixing this on my Python 3.8 Travis CI builds?

Revision history for this message
Marius Gedminas (mgedmin) wrote :

A new lxml PyPI release would be best.

(You can pip install lxml directly from git as a workaround, if you pip install cython beforehand.)

Revision history for this message
scoder (scoder) wrote : Re: [Bug 1829853] Re: pip install lxml fails on Python 3.8 prerelease builds

Let's wait until CPython 3.8 beta 1 is at least officially out.

Revision history for this message
Marius Gedminas (mgedmin) wrote :
Revision history for this message
Jad Chaar (jc713) wrote :

Now that 3.8b1 is out, think we can get a new build of lxml soon?

scoder (scoder)
Changed in lxml:
assignee: nobody → scoder (scoder)
importance: Undecided → Low
milestone: none → 4.3.4
status: New → Fix Released
Revision history for this message
Marius Gedminas (mgedmin) wrote :

CPython 3.8 beta 2 is out now, and guess what -- it reverts the API change! Now lxml fails because it adjusted for CPython 3.8 beta 1. See https://bugs.launchpad.net/lxml/+bug/1835492

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.