-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent installation with unsupported Python #873
Prevent installation with unsupported Python #873
Conversation
With this commit we specify `python_requires` in our setup file which generates the necessary metadata so that pip checks whether the user's Python version is within the allowed range and aborts the installation if the requirement is not met. This feature requires pip 9.0.0 or better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an alternative to the 999 patchset version would be >=3.5, <3.9
I believe this would work, but it does not matter much to me.
Indeed it does but we also generate the (human-readable) list of supported versions from that list and that's the main reason we base |
With this commit we emit an exclusive ordered comparison for the upper bound of the supported versions in the `python-requires` metadata of the package. To do this, we reference not the latest supported version but rather the first unsupported version.
With this commit we specify
python_requires
in our setup file whichgenerates the necessary metadata so that pip checks whether the user's
Python version is within the allowed range and aborts the installation
if the requirement is not met. This feature requires pip 9.0.0 or
better.