-
Notifications
You must be signed in to change notification settings - Fork 667
Description
Description:
I'm using python-version-file: pyproject.toml to specify which Python version to use. My pyproject.toml is pretty standard poetry config, with a python = "^3.8" marker.
However, when using the action with such a config, it uses the most recent supported Python version. This doesn't make much sense to me, as Python code is generally forwards-compatible (except numpy/scipy/etc), but it is not backwards-compatible, as there are features in newer versions that aren't supported in previous versions (which is why I always run my CI jobs with the lowest supported Python minor version).
I expected it to pick the lowest supported minor version with the highest patch. Such that ^3.8 picks 3.8.15, not 3.12.0.
Justification:
With the current behavior, using python-version-file with a pyproject.toml that has a Python version marker specified with ^ (common) would basically be a no-op, as it will pick the same version as if python-version-file isn't specified at all.
Thus, I don't see much use for the current behavior, and would like to see it changed.
One option is to add a config to choose the behavior, which would prevent breakage in people's existing workflows. (as I did in #775)
Are you willing to submit a PR?
Yes! Done in #775