lxml==5.2.1 wheel is broken on macOS with CPython 3.8

Bug #2064158 reported by William Woodruff
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
New
Undecided
Unassigned

Bug Description

I'm filing this based on a locally observed breakage, reproduced from a breakage in pypa/twine's CI: <https://github.com/pypa/twine/pull/1096>. This was originally observed as a mysterious failure within `mypy` to find the `lxml` package, despite `lxml` being installed into the active virtual environment.

TL;DR: importing `etree` from `lxml` causes an `ImportError` on a missing symbol: `_exsltDateXpathCtxtRegister`

Here's the full traceback, from `pip install lxml==5.2.1` on CPython 3.8.18 on macOS:

```
>>> from lxml import etree
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/william/tmp/env/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'
```

Reproduction steps (using `pyenv` to bootstrap Python 3.8):

```
pyenv install 3.8.18
pyenv shell 3.8.18
python -m venv env && source env/bin/activate
python -m pip install lxml==5.2.1
python -c 'from lxml import etree'
```

This failure does **not** happen with `lxml==5.2.0`, strongly suggesting a wheel build regression on macOS (and possibly other platforms) between 5.2.0 and 5.2.1.

As a result of this bug, I'm unable to submit the library version metadata suggested in the issue template. However, the wheel in question is `lxml-5.2.1-cp38-cp38-macosx_10_9_universal2.whl`, which is on PyPI here: <https://files.pythonhosted.org/packages/ed/2e/c2efd8da53ea4c17d20bc12db17509ec5f46a7093599c067bac22d414e0b/lxml-5.2.1-cp38-cp38-macosx_10_9_universal2.whl>.

Revision history for this message
William Woodruff (cptyossarian) wrote :

From looking through recent changes, it appears that the 3.8 wheel is known to be broken and was intentionally skipped in `cibuildwheel`: <https://github.com/lxml/lxml/commit/dd85a2dc13221a509da198d5297ee4667ec4aa7e>

However, that change was made prior to 5.2.1's release, meaning that the current wheel on PyPI is still non-functional. I believe yanking that individual wheel would suffice to resolve this issue, given that future releases will not build this wheel at all.

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.