Expose UV_PYTHON_SEARCH_PATH for Python discovery PATH overrides#19034
Merged
zanieb merged 5 commits intoastral-sh:mainfrom Apr 20, 2026
Merged
Expose UV_PYTHON_SEARCH_PATH for Python discovery PATH overrides#19034zanieb merged 5 commits intoastral-sh:mainfrom
UV_PYTHON_SEARCH_PATH for Python discovery PATH overrides#19034zanieb merged 5 commits intoastral-sh:mainfrom
Conversation
UV_PYTHON_SEARCH_PATH for Python discovery PATH overrides
zanieb
commented
Apr 17, 2026
Member
Author
|
I don't think |
|
https://github.com/search?q=UV_TEST_PYTHON_PATH+-language%3ARust&type=code shows that nothing on github other than clones of |
Promote the internal test-only `UV_TEST_PYTHON_PATH` environment variable to a user-facing `UV_PYTHON_SEARCH_PATH` that overrides `PATH` for Python executable discovery. Add dedicated integration test coverage in `python_find_search_path`. https://claude.ai/code/session_01XUesSCJ1o1nHBxFEBEzfZ3
77ed576 to
21e63b0
Compare
zanieb
commented
Apr 17, 2026
|
|
||
| // List installed versions with registry discovery enabled. | ||
| // We remove UV_TEST_PYTHON_PATH to enable registry discovery (it's skipped when set), | ||
| // We remove `UV_PYTHON_SEARCH_PATH` to enable registry discovery (it's skipped when set), |
Member
Author
There was a problem hiding this comment.
Noticed this during review — I don't think we want this behavior so #19035 is needed.
zanieb
added a commit
that referenced
this pull request
Apr 20, 2026
Required for #19034 Arguably, we could keep our existing behavior and have `UV_PYTHON_SEARCH_PATH` implicitly disable the registry lookup, but I think that's too confusing. This disables registry lookups everywhere and modifications in `uv python install`. In the latter case, `UV_PYTHON_INSTALL_REGISTRY` takes precedence.
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.
Closes #19027
Closes #9506 (while the request there is to extend
PATH, they can setUV_PYTHON_SEARCH_PATH=...;$PATH)