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

feat: added python-version-strategy config option, to enable enforcing use of the lowest supported (approximate) version #775

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ErikBjare
Copy link

@ErikBjare ErikBjare commented Dec 6, 2023

Description:

Adds a python-version-strategy config option that enables overriding the version-picking strategy provided by the Python version specifier from >= and ^ to ~.

This is very useful when the version specified in python-version-file is a version constraint such as ^3.8 but where you usually want to test against the lowest supported version (with the highest patch version).

Related issue:

Filed a feature request for this here: #774

Check list:

  • Mark if documentation changes are required.
    • Not done, yet (will do if PR is likely to be accepted)
  • Mark if tests were added or updated to cover the changes.
    • Not done, yet (will do if PR is likely to be accepted)

PRs I will merge if this change is accepted:

…g use of the lowest supported (approximate) version
@@ -73,6 +74,9 @@ function resolveVersionInput() {
}
}

if(versionStrategy == "approximate")
Copy link
Author

Choose a reason for hiding this comment

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

Might be better to make the versionStrategy directly take ~ as an argument, so that it can be used for all kinds of version overrides.

Not sure if there are uses for overriding the strategy to ^ however.

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.

2 participants