Issue-11796: Provide more descriptive message for uv run pythonx.xx #12201
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
#11796
Summary
run python<valid-python-version>
.✅ "python", "python3", "python3.9", "python4", "python3.10", "python3.13.3", "python39" (yes, python39 might still be released in 100 years 😆 )
❌ "python3abc", "python3.12b3", "", "python-foo"
uv project
or not. See: https://github.com/astral-sh/uv/pull/12201/files#diff-423c3a82aab6dba4068dd7675391fc9328a66682131dbf2043e7847ab4ba8661R1092Automated Tests
Need to Discuss
python3.11.9
is invalid. However, uv supportsuv run -p 3.11.9 python
, which is why when we do the following:We will get the following error:
Is this okay? If not, we need to define the specs in the PR here.
post
versionSee:https://github.com/astral-sh/uv/pull/12201/files#diff-423c3a82aab6dba4068dd7675391fc9328a66682131dbf2043e7847ab4ba8661R1572-R1574
Would this be okay?
We can change the specs if needed. Lets discuss.
Manual Test
Case 1: run outside of project
python3.9
)cargo run -- run python3.9.3
cargo run -- run python3.9
cargo run -- run python3.11
cargo run -- run python3.11.9
IMPORTANT: Is this acceptable? Invoking python by its patch version is not supported, so this is the expected behavior, but we need to discuss whether this behavior is acceptable.
Case 2: run inside of project
Create project using
uv init example-app
uv run python3.13
uv run python3