Closed jtratner closed 2 years ago
If helpful, typing-extensions uses twine to do uploads (from discussion in python/typing_extensions#14 ) and their pyproject.toml looks like it has the correct format of Requires-Python: as well.
(I'm noticing now that pip has now released v22 and dropped support for python3.6 - so no worries if you don't have bandwidth to address it! Just hoping for short-term fix until we can upgrade away from python3.6)
That’s weird. Pip itself is released with requires-python metadata, and from your -v
output pip can actually correctly identify those on PyPI (I think those are emitted during the post-invocation version-check code). But I can’t tell why it can’t pick up those on the typing-extensions page, they look exactly the same from what I tell…
<a href="https://files.pythonhosted.org/packages/75/e1/932e06004039dd670c9d5e1df0cd606bf46e29a28e65d5bb28e894ea29c9/typing_extensions-4.2.0-py3-none-any.whl#sha256=6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708" data-requires-python=">=3.7">typing_extensions-4.2.0-py3-none-any.whl</a><br/>
<a href="https://files.pythonhosted.org/packages/fe/71/1df93bd59163c8084d812d166c907639646e8aac72886d563851b966bf18/typing_extensions-4.2.0.tar.gz#sha256=f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376" data-requires-python=">=3.7">typing_extensions-4.2.0.tar.gz</a><br/>
<a href="https://files.pythonhosted.org/packages/4d/16/0a14ca596f30316efd412a60bdfac02a7259bf8673d4d917dc60b9a21812/pip-22.0.4-py3-none-any.whl#sha256=c6aca0f2f081363f689f041d90dab2a07a9a07fb840284db2218117a52da800b" data-requires-python=">=3.7">pip-22.0.4-py3-none-any.whl</a><br/>
<a href="https://files.pythonhosted.org/packages/33/c9/e2164122d365d8f823213a53970fa3005eb16218edcfc56ca24cb6deba2b/pip-22.0.4.tar.gz#sha256=b3a9de2c6ef801e9247d1527a4b16f92f2cc141cd1489f3fffaf6a9e96729764" data-requires-python=">=3.7">pip-22.0.4.tar.gz</a><br/>
Hmm, this works correctly on Ubuntu for me (I only have 3.6.13 but that shouldn’t affect things…?)
$ virtualenv --python=python3.6 pip-11046
created virtual environment CPython3.6.13.final.0-64 in 460ms
creator CPython3Posix(dest=/home/uranusjr/Documents/play/pip-11046, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/uranusjr/.local/share/virtualenv)
added seed packages: pip==21.3.1, setuptools==59.1.1, wheel==0.37.0
$ ./pip-11046/bin/python -m pip install -v --no-cache-dir --disable-pip-version-check typing-extensions
Using pip 21.3.1 from /home/uranusjr/Documents/play/pip-11046/lib/python3.6/site-packages/pip (python 3.6)
Link requires a different Python (3.6.13 not in: '>=3.7'): https://files.pythonhosted.org/packages/75/e1/932e06004039dd670c9d5e1df0cd606bf46e29a28e65d5bb28e894ea29c9/typing_extensions-4.2.0-py3-none-any.whl#sha256=6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708 (from https://pypi.org/simple/typing-extensions/) (requires-python:>=3.7)
Link requires a different Python (3.6.13 not in: '>=3.7'): https://files.pythonhosted.org/packages/fe/71/1df93bd59163c8084d812d166c907639646e8aac72886d563851b966bf18/typing_extensions-4.2.0.tar.gz#sha256=f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376 (from https://pypi.org/simple/typing-extensions/) (requires-python:>=3.7)
Collecting typing-extensions
Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Installing collected packages: typing-extensions
Successfully installed typing-extensions-4.1.1
Can you try pip install -vv --no-cache-dir --disable-pip-version-check typing-extensions
? pip would print all the links it found in double-verbose mode. I wonder if pip somehow does not sees the requires-python attribute, or magically thinks 3.6.11 matches >=3.7.
Thanks @uranusjr - I will test this out on more systems! (FWIW this started as an issue on ubuntu [but prob old Ubuntu] and then I reproduced it on my mac)
I am SO SO sorry, I'm so embarrassed. I realized we'd put in a config file to ignore requires-python earlier and I didn't notice it until the -vv
check.
Sorry to waste your time there - I should've tried to reproduce this without having a pip config file set up.
Ignoring failed Requires-Python check (3.6.11 not in: '>=3.7') for link: https://files.pythonhosted.org/packages/fe/71/1df93bd59163c8084d812d166c907639646e8aac72886d563851b966bf18/typing_extensions-4.2.0.tar.gz#sha256=f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376 (from https://pypi.org/simple/typing-extensions/) (requires-python:>=3.7)
Description
Typing-extensions released a new version yesterday that broke compatibility with python3.6 (makes sense!); however, now we are hitting issues that pip 21.3.1 in a python3.6 environment does not correctly skip typing-extensions 4.2.0.
The weird part about the whole thing is that the package metadata for typing-extensions shows a
Requires-Python: >=3.7
when downloaded, but somehow pip doesn't see it? (Or perhaps it was uploaded incorrectly to pypi).Totally understand we're using a very out of date version of python, but that's where we're at right now. Really appreciate any help debugging this and happy to move this to somewhere else if there's a better place to put it.
Some additional background - the tarball clearly has different requires python
Plus HTML on PyPI shows that it has the right
requires-python
attribute in the HTML.`
Expected behavior
Installing on python3.6 skips typing-extensions 4.2.0 and instead installs 4.1.1
pip version
21.3.1
Python version
3.6.11
OS
Mac 10.15 (reproduces on Ubuntu as well)
How to Reproduce
virtualenv --python=python3.6 somevenv source somevenv/bin/activate python --version pip --version pip install -v --no-cache-dir typing-extensions # should not be 4.2
Output
Code of Conduct