Repository navigation
Allow version specifiers to be used in Python version requests - #4214
Merged
Merged
Conversation
zanieb
force-pushed
the
zb/version-request-range
branch
from
June 10, 2024 20:05
e232add to
7f370c3
Compare
zanieb
force-pushed
the
zb/version-request-range
branch
2 times, most recently
from
June 10, 2024 20:11
fc7e190 to
1321ccf
Compare
zanieb
marked this pull request as ready for review
June 10, 2024 20:12
Member
Author
|
A little terrifying... |
zanieb
force-pushed
the
zb/version-request-range
branch
from
June 10, 2024 20:35
1321ccf to
d19f861
Compare
zanieb
commented
Jun 10, 2024
Member
Author
There was a problem hiding this comment.
This is problematic, need to add a filter for this
Member
Author
There was a problem hiding this comment.
uv/crates/uv/src/commands/project/mod.rs
Lines 151 to 156 in 90947a9
zanieb
commented
Jun 10, 2024
charliermarsh
approved these changes
Jun 10, 2024
This was referenced Jun 10, 2024
Member
Author
zanieb
added a commit
that referenced
this pull request
Jun 10, 2024
Cherry-picked from #4214 The first commit gets us some context on an IO error during queries: Previously: ``` failed to canonicalize path `[VENV]/bin/python3` Caused by: No such file or directory (os error 2) ``` Now: ``` Failed to query Python interpreter Caused by: failed to canonicalize path `[VENV]/bin/python3` Caused by: No such file or directory (os error 2) ``` but really we shouldn't attempt to query a missing interpreter during discovery anyway, so we improve handling of that too.
zanieb
added a commit
that referenced
this pull request
Jun 10, 2024
By setting the test search path to an empty path, we avoid accidentally pulling interpreters from the system during a test case. Cherry-picked from #4214
# Conflicts: # crates/uv/tests/common/mod.rs
zanieb
force-pushed
the
zb/version-request-range
branch
from
June 10, 2024 22:40
1a449ca to
662a4c2
Compare
zanieb
added a commit
that referenced
this pull request
Jun 13, 2024
…ecifiers (#4289) Before 0.2.10 we would parse `--python=python` as an executable name. After #4214, we started treating this as a Python version range request (with an empty version range). This is not entirely unreasonable, but it was an unexpected regression and I don't think `VersionRequest` should support empty ranges in its `from_str` implementation without more consideration.
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.
In service of #4212 but this is user-facing e.g. Python discovery will support version specifiers everywhere now.
Closes #4212