Consolidate Python discovery strategies - #19775
Merged
Merged
Conversation
zanieb
force-pushed
the
zb/python-list-explicit-path-errors
branch
from
June 10, 2026 21:45
f05c06a to
e601034
Compare
zanieb
force-pushed
the
zb/refactor-python-discovery
branch
from
June 10, 2026 21:46
d3762cc to
9f43020
Compare
zanieb
force-pushed
the
zb/python-list-explicit-path-errors
branch
from
June 10, 2026 21:48
e601034 to
e9d833c
Compare
zanieb
force-pushed
the
zb/refactor-python-discovery
branch
from
June 10, 2026 21:49
9f43020 to
29849e4
Compare
zanieb
force-pushed
the
zb/refactor-python-discovery
branch
from
June 10, 2026 22:02
d6536e5 to
c500660
Compare
zanieb
force-pushed
the
zb/refactor-python-discovery
branch
from
June 10, 2026 22:09
c500660 to
47c52db
Compare
uv test inventory changesThis PR changes the tests when compared with the latest
|
zanieb
marked this pull request as ready for review
June 10, 2026 22:59
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.
Summary
Consolidate the sequential and parallel Python discovery paths introduced in #18684.
Both modes now share a single
PythonRequestdispatcher and executable-to-installation pipeline. A privateQueryStrategyselects either lazy sequential querying or eager parallel querying while preserving the existing filtering, ordering, and error-handling behavior.No prefetching is introduced here. Sequential discovery still defers reading and traversing
PATH, advances candidate executables one at a time, and stops querying after finding an acceptable installation. The pre-existing eager behavior for explicit file, directory, and executable-name requests is unchanged.Test Plan
PythonRequestvariant, using independent caches and out-of-order query completion to verify ordered results and non-critical error handling.PATHdirectories are not inspected early, and later interpreters are not queried after a match.PATHdirectory filtering.cargo test -p uv-pythoncargo test -p uv --test python python_list --no-fail-fastcargo test -p uv --test python python_find --no-fail-fastcargo +stable clippy -p uv-python --tests --no-deps --locked -- -D warningscargo +stable fmt --all -- --check