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

Fix handling of maximum python version in pick_python_cmd #3478

Open
wants to merge 4 commits into
base: 5.0.x
Choose a base branch
from

Conversation

Flamefire
Copy link
Contributor

When the minor version is unset, only the major version must be checked.
Otherwise patch versions etc. must be ignored.
This allows:
3.7.4 for "max_py_majver=3" and "max_py_majver=3 max_py_minver=7"

However I'd argue that our current approach with max_py_maj/minver and req_py_maj/minver is error-prone anyway: It does not make sense to only specify a minor version for either. Hence I'd change that easyconfig parameter into a single one: required_python_version which is a string like "3.7", same for the max version.
This can then be converted to a LooseVersion and fully avoids the possibility of missing major versions as well as having only a single parameter instead of 2. We can convert the current parameters to the new one automatically and deprecate them for 5.1 or IMO better just remove them for 5.0 as currently ReFrame is the only EC using this and it is trivial to update.

When the minor version is unset, only the major version must be checked.
Otherwise patch versions etc. must be ignored.
This allows:
3.7.4 for "max_py_majver=3" and "max_py_majver=3 max_py_minver=7"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant