Closed AWhetter closed 2 years ago
Hi.
How can I see this metadata that was uploaded to PyPI? Is this somehow separate from what is included in the distrubution files?
setup.py does have the correct python_requires argument and I see that the generated PKG-INFO in the .tar.gz also contains it. Wheel config was fixed in #69.
Is it possible that you're using an old version of pip that does not know about python_requires? See note here: https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
PyPI displays it in the "Meta" information to the left hand side of the page. For example setuptools shows "Requires: Python >=3.6" (https://pypi.org/project/setuptools/) but no such entry exists for unidecode (https://pypi.org/project/Unidecode/). You could also inspect the HTML of the "simple" pages for this information. setuptools-58.0.4.tar.gz
has the attribute data-requires-python=">=3.6"
(https://pypi.org/simple/setuptools/) but unidecode does not (https://pypi.org/simple/unidecode/).
I mentioned twine because, even though unidecode already specifies python_requires
, whether this information is sent depends on the capability of the tool that you're using to upload the package. The information is sent separately to the sdist and wheel. By that I mean that uploading the sdist or wheel alone is not enough for this information to make its way onto PyPI. You can see that here (https://warehouse.pypa.io/api-reference/legacy.html#upload-api) where the "Requires-Python" information is sent optionally as one of the fields from the "Core metadata specifications".
I'm using pip 20.3.4, so it's definitely new enough to understand this information and it does download the correct versions for other packages.
Thanks for the detailed explanation! I've uploaded 1.3.2 with Twine and yanked 1.3.1 as you suggested.
This is working again for me. Thank you so much for the fast fix!
Version 1.3.1 is Python only, but when it was published the python_requires information did not get sent to PyPI, and therefore Python 2 versions of pip are trying to download it but failing. I don't know how unidecode gets published to PyPI, but tools like twine will send the python_requires information automatically. Please could version 1.3.1 be yanked and a version 1.3.2 published with the python_requires information available.