question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add python_requires='>=3.4' and yank previous releases dropping Python 2.7

See original GitHub issue

Hello!

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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Nicusor97commented, Aug 3, 2020

@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/* `

1reaction
ThiefMastercommented, Aug 3, 2020

looks good, so once you yanked 0.17.0 it should work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropping support for older Python versions
Dropping support for older Python versions is supported by the standard Core metadata specifications 1.2 specification via a “Requires-Python” attribute.
Read more >
Set max version of pipenv in python2.7 · Issue #497 - GitHub
I suggest adding a max or default version of pipenv in python2.7 as pipenv has dropped support for python2 in the latest releases....
Read more >
can't install pip anymore with python 2.7? - Stack Overflow
The latest pip has dropped support for Python 2 And you cannot install ... Note - it installs an older version of Pip...
Read more >
snowflake-connector-python - PyPI
Snowflake Connector for Python. ... Added support for Python version 3.10. ... Updated the dependency on the cryptography package from version 2.9.2 to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found