Skip to content

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
}
}

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