Skip to content
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

Merged
merged 4 commits into from
Jan 21, 2020

Conversation

danielmitterdorfer
Copy link
Member

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.

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.
@danielmitterdorfer danielmitterdorfer added enhancement Improves the status quo :Usability Makes Rally easier to use labels Jan 16, 2020
@danielmitterdorfer danielmitterdorfer added this to the 1.4.1 milestone Jan 16, 2020
@danielmitterdorfer danielmitterdorfer self-assigned this Jan 16, 2020
Copy link
Contributor

@ebadyano ebadyano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

Copy link
Contributor

@hub-cap hub-cap left a 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.

@danielmitterdorfer
Copy link
Member Author

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 python_requires on an inclusive range.

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.
@danielmitterdorfer
Copy link
Member Author

@hub-cap I've implemented a different approach now in bb4027c which defines the version range as >=3.5,<3.9. Can you please take another look?

@danielmitterdorfer danielmitterdorfer merged commit 21b9764 into elastic:master Jan 21, 2020
@danielmitterdorfer danielmitterdorfer deleted the python-requires branch January 21, 2020 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :Usability Makes Rally easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants