-
Notifications
You must be signed in to change notification settings - Fork 575
Description
Although PyYaml's setup.py contains a requires_python field, the pypi.org links do not have the expected data-requires-python anchor attribute (see PEP 503). This creates problems for users of older Python versions as pip uses this information to determine which version to download and install.
For example, on Python 3.4:
$ pip install pyyaml
Collecting pyyaml
Downloading https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz (269kB)
ERROR: PyYAML requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*' but the running Python is 3.4.10
With the correct metadata, pip could automatically select and install PyYAML 5.2, the latest version with Python 3.4 support.
The reason for this issue seems to be that the Requires-Python metadata property was not provided when these artifacts were uploaded. If using setuptools for PyPI uploads, please switch to twine for future releases to ensure full metadata support. See https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
It would be great if you could also fix the metadata for existing artifacts as well, at least from version 5.3 onward. I believe this can be done using the twine register command.