Skip to content

fix: uv version is now uv self version, support UV#955

Merged
henryiii merged 3 commits intowntrblm:mainfrom
henryiii:henryiii/fix/uvversion
Apr 30, 2025
Merged

fix: uv version is now uv self version, support UV#955
henryiii merged 3 commits intowntrblm:mainfrom
henryiii:henryiii/fix/uvversion

Conversation

@henryiii
Copy link
Copy Markdown
Collaborator

@henryiii henryiii commented Apr 30, 2025

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)

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Spectre5 and others added 2 commits April 30, 2025 10:51
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii requested a review from Copilot April 30, 2025 17:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@henryiii henryiii merged commit b943f95 into wntrblm:main Apr 30, 2025
25 checks passed
@henryiii henryiii deleted the henryiii/fix/uvversion branch April 30, 2025 17:40
@Spectre5
Copy link
Copy Markdown
Contributor

Spectre5 commented May 1, 2025

@henryiii can we get a release for this?

@henryiii
Copy link
Copy Markdown
Collaborator Author

henryiii commented May 1, 2025

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 :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants