Harden uv Python compatibility for inline scripts - #1733
Merged
Stella Huang (StellaHuang95) merged 1 commit intoAug 26, 2026
Merged
Conversation
|
🔒 Automated review in progress — Heejae Chang (@heejaechang) is auto-reviewing this PR. |
|
Verification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified. |
Heejae Chang (heejaechang)
approved these changes
Aug 25, 2026
Heejae Chang (heejaechang)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
Comment on lines
+291
to
+295
| const args = ['python', 'list']; | ||
| if (options?.allVersions) { | ||
| args.push('--all-versions'); | ||
| } | ||
| args.push('--output-format', 'json'); |
Contributor
There was a problem hiding this comment.
Why not add --output-format json to the args list?
Contributor
Author
There was a problem hiding this comment.
what do you mean? it is added to the args list
Stella Huang (StellaHuang95)
force-pushed
the
copilot/pep723-uv-compat
branch
from
August 26, 2026 17:36
87c5215 to
a281544
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Stella Huang (StellaHuang95)
force-pushed
the
copilot/pep723-uv-compat
branch
from
August 26, 2026 18:20
a281544 to
55fd95c
Compare
Stella Huang (StellaHuang95)
merged commit Aug 26, 2026
03176cd
into
microsoft:main
44 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
Inline-script environment creation selects an installed Python when possible and falls back to installing a compatible Python with uv. The fallback has to use the same PEP 440 semantics before and after installation; otherwise setup can download Python successfully and then reject it.
This remains behind the undeclared, default-off inline-script feature flag.
Why this change is needed
Two compatibility paths were inconsistent:
!=3.15.0rc2.==3.13could be passed to uv as the broad selector3.13. uv may install a later 3.13 patch, while strict PEP 440 equality requires 3.13.0.The default uv catalog can also omit older patch releases. A strict short-exact lookup therefore needs an all-versions catalog to find 3.13.0 after newer 3.13 releases exist.
What changed
uv python list --all-versions; existing catalog callers retain their previous command arguments.Behavior and compatibility
Reviewer guide
inlineScript/envManager.ts.allVersionsoption.Validation
npm run compile-tests --silentgit diff --check