lxml build failure on CPython 3.13t (CPython without global interpreter lock via --disable-gil build option)

Bug #2069434 reported by bastimeyer
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lxml
Confirmed
Low
Unassigned

Bug Description

Building lxml fails on CPython `3.13t` (disabled GIL).
Building lxml on default CPython `3.13` however works fine.

- https://docs.python.org/3.13/whatsnew/3.13.html#summary-release-highlights
- https://peps.python.org/pep-0703/
- https://peps.python.org/pep-0703/#backwards-compatibility
- https://peps.python.org/pep-0703/#python-build-modes

```
$ lsb_release -sd
"Arch Linux"

$ pacman -Q python313 libxml2 libxslt
python313 3.13.0b2-1
libxml2 2.12.7-1
libxslt 1.1.39-2
```

```
$ python3.13 -c 'import sys;print(f"{sys.version_info=}\n{sys.abiflags=}")'
sys.version_info=sys.version_info(major=3, minor=13, micro=0, releaselevel='beta', serial=2)
sys.abiflags='t'
```

```
$ python3.13 -m venv /tmp/venv-lxml-313t
$ source /tmp/venv-lxml-313t/bin/activate
$ pip -v install git+https://github.com/lxml/lxml.git
```

The pip build log is added as an attachment.

As explained in the linked PEP, there are CPython ABI changes when the GIL is disabled via CPython's `--disable-gil` build option, but those changes will become the default in future CPython releases (after 2-3 minor versions). Extension authors are supposed to target both ABI versions in the mean time.

Revision history for this message
bastimeyer (bastimeyer) wrote :
Revision history for this message
scoder (scoder) wrote :

Thanks for the report. The compile issues are being worked on in Cython.

There are more known issues in lxml due to the removal of the global lock, though. They'll also need changes eventually that add more fine-grained locking.

Changed in lxml:
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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