Add python_requires='>=3.4' and yank previous releases dropping Python 2.7
See original GitHub issueHello!
I’ve just noted that validators
dropped Python 2.7 support at version 0.14.3.
It seems it kept working in my case until 0.16.0. My luck I guess 😃
Unfortunatly, the package doesn’t fully properly declare the drop of Python 2.7, causing Python 2.7 system to keep trying to install it. The solution: Add python_requires='>=3.4'
in the setup.py (https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires)
Another unfortunate aspect is that it’s not possible to go back in time to add this metadata to 0.14.3, 0.15.0 and 0.16.0.
The solution to this would be the new option to yank releases from pypi.
In short, it prevents a package version from being automatically picked up by a pip install validators
, but will keep that package version available for anyone specifically requesting with pip install validators==0.14.3
for instance. The best of both worlds 😃.
The option should be available from the maintainer’s UI.
Ref:
https://pypi.org/help/#yanked
https://twitter.com/di_codes/status/1253166894158417926
Doing both of these would be sincerly greatly appreciated.
I can send a MR for the python_requires='>=3.4'
part, but the yank on pypi is necessary for keeping the ecosystem sane for system still depending on Python 2.7.
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:13 (2 by maintainers)
Top GitHub Comments
@kvesteri What version of setuptools are you using?
And also, why not using twine? From the official documentation of dropping older versions of Python: https://packaging.python.org/guides/dropping-older-python-versions/ , they are suggesting to use twine al least 1.9.
Using setuptools, somehow the pypi doesn’t detect that validators 0.17.0 is for python>=3.4 only, so instead this fails at the pip install level.
ERROR: Package 'validators' requires a different Python: 2.7.14 not in '>=3.4'
I think the uploading process using twine should look like: ` $ pip install -U pip setuptools wheel twine$ rm -rf dist/ build/
$ python setup.py sdist bdist_wheel
$ twine upload -r test dist/*
$ twine upload dist/* `
looks good, so once you yanked 0.17.0 it should work