avian2 / unidecode

ASCII transliterations of Unicode text - GitHub mirror
https://pypi.python.org/pypi/Unidecode
GNU General Public License v2.0
516 stars 62 forks source link

Version 1.3.1 (and 1.3.0) published without python_requires metadata given to PyPI #70

Closed AWhetter closed 2 years ago

AWhetter commented 2 years ago

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.

avian2 commented 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

AWhetter commented 2 years ago

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.

avian2 commented 2 years ago

Thanks for the detailed explanation! I've uploaded 1.3.2 with Twine and yanked 1.3.1 as you suggested.

AWhetter commented 2 years ago

This is working again for me. Thank you so much for the fast fix!