🐛 fix(lock): use bundled uv binary for uv sync#292
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Feb 23, 2026
Merged
Conversation
When a system-installed uv is older than the project's `tool.uv.required-version`, `uv sync` fails because the lock runner was invoking a bare `"uv"` string resolved via PATH rather than the bundled binary from `find_uv_bin()`. All other commands (`uv venv`, `uv pip install`, `uv pip freeze`) already use `self.uv` which returns the bundled path. Aligning `uv sync` to do the same ensures version consistency. Fixes tox-dev#239
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.
When a project sets
tool.uv.required-versioninpyproject.tomland the system-installed uv is older than that constraint,uv syncin the lock runner fails withRequired uv version does not match the running version. 🐛 This happens because the lock runner invokes a bare"uv"string that gets resolved via PATH to the system binary, while all other commands (uv venv,uv pip install,uv pip freeze) already useself.uvwhich resolves to the bundled binary fromfind_uv_bin().The fix aligns
uv syncwith every other uv invocation by usingself.uvinstead of a hardcoded string. This ensures the bundled uv version (which tox-uv pins as a dependency) is always used, avoiding version mismatches withrequired-versionconstraints.No behavioral change for users whose system uv matches or exceeds the bundled version. Users who previously hit this error no longer need to manually update their system uv.
Fixes #239