Closed woodruffw closed 6 months ago
I confirmed that this fixes the dist name assert locally, but the integration suite is now flaking on TestPyPI itself returning 503s.
The flake on (macOS, 3.8) appears to be something very deeply broken: I can confirm that lxml
itself is installed, but it appears that lxml's 3.8 macOS wheel may actually be broken, causing mypy
to ImportError
on it. From local testing:
>>> 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'
>>>
(That approximates how mypy
discovers lxml
: https://github.com/python/mypy/blob/ba6febc903776491ea445cef2ef5375b95e178cd/mypy/report.py#L27-L32)
Integration is still flaky for the reason above, but I've "fixed" the Python 3.8 macOS failure by excluding the current patch version of lxml
from the types
environment. I've filed a launchpad tracker for the bad wheel here: https://bugs.launchpad.net/lxml/+bug/2064158
This should fix the integration tests.
Explanation: the integration suite uses
pypa/sampleproject
, which usessetuptools
as its build backend.setuptools
in turn has recently switched to adhering to PEP 625, which enforces that hyphens in package names be normalized to underscores to eliminate a parsing ambiguity in the sdist file format.sampleproject
's backend dependency onsetuptools
is unconstrained, which means in principle that the latest version should always be used. However, this patch allows both the PEP 625 and the old variant, just in casepip
or other layers of the stack select an oldersetuptools
.See also: https://github.com/pypa/setuptools/issues/3593