-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Use Case/Reproduce guide
-
pyproject.tomlspecifiesrequires-python = ">=3.12". -
.python-versionin repo root is3.14(or any compatible withrequires-pythonfield, I don't think it matters). -
Result of
uv python findon your github action version running is3.11(we are running github action with docker image version2.33.1.0which appears to default to python3.11). -
python-versionargument to the action is not set. -
Probably not relevant: my project uses uv workspaces.
Outcome
- Setup action succeeds.
- Next step which uses
uvafter setup fails:
Using CPython 3.11.15
error: The requested interpreter resolved to Python 3.11.15, which is incompatible with the project's Python requirement: `>=3.12`.
The following `requires-python` declarations do not permit this version:
[redacted: my packages]Proposal: Enhancement
- I could just resolve this by setting
python-version. I don't want to do this - I am maintaining a compound reusable action which runs this step, along with plenty of others, in CI. As well as not wanting to expose arguments to end users, they have already created a.python-versionfile . - Since passing the
python-versioncan already resolve this, this should be considered an enhancement and not a bug. - I would like to add in the action: capability to look for the
.python-versionfile whenpython-versionis not set. Use the.python-versionfound if the file exists, but revert to default behaviour (useuv python find) if it is not found. As part of this, it might be essential to check if the.python-versionfile conflicts with therequiressemver in thepyproject.toml.
Would you consider this contribution? Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels