fix: uv version is now uv self version, support UV#955
Merged
henryiii merged 3 commits intowntrblm:mainfrom Apr 30, 2025
Merged
fix: uv version is now uv self version, support UV#955henryiii merged 3 commits intowntrblm:mainfrom
henryiii merged 3 commits intowntrblm:mainfrom
Conversation
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the uv detection and version retrieval logic to support uv 0.7 and introduces functionality to leverage the UV environment variable.
- Updates test parameterization in tests/test_virtualenv.py to include a new uv_env parameter for better simulation of environments.
- Modifies subprocess command calls in both tests and nox/virtualenv.py to use “uv self version” while preserving backward compatibility for uv < 0.7.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_virtualenv.py | Added uv_env parameter in tests and updated monkeypatch behaviors. |
| nox/virtualenv.py | Adjusted uv lookup logic and version command to support new uv syntax. |
Comments suppressed due to low confidence (1)
tests/test_virtualenv.py:900
- [nitpick] Consider refactoring this lambda into a named helper function to improve clarity. This will make it easier to understand when which_result or uv_env should be returned.
monkeypatch.setattr(shutil, "which", lambda x: which_result if x.endswith("uv") else uv_env)
Contributor
|
@henryiii can we get a release for this? |
Collaborator
Author
|
Yes, tonight or tomorrow. Trying to quickly fix a few of the most recent open issues, specifically the "broken with newest condas" one. I've updated my conda to test it and now I need to it too :). |
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.
We don't support uv 0.7. This fixes it and also supports the UV environment variable, which wasn't something UV had before. (This fixes nested uv calls, uv sets UV when it calls anything)