Repository navigation
Prefer Nu's own uv to one on the PATH - #50
Merged
Merged
Conversation
find_uv() checked the PATH before the uv wheel Nu depends on, so an installed Nu used whatever uv a learner had installed (the Windows MSI check found it using one from a Python's Scripts folder). Nu needs uv>=0.9.8 (`uv pip install --excludes` for plugins), and an older uv on the PATH would break adding plugins. Now: MU_UV -> the uv package's binary -> the PATH, only if Nu has none of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Found while checking the MSI from
masteron Windows 11. The Environment tab's Nu's uv showed…\Python313\Scripts\uv.EXE: the installed app was using a uv that happened to be on the PC, not the one it ships with.find_uv()checkedPATHbefore Nu's ownuvwheel. Nu needsuv>=0.9.8(adding a plugin usesuv pip install --excludes), so a learner with an older uv on theirPATHwould hit failures, starting with adding plugins.MU_UV(to choose another uv on purpose) → theuvpackage's binary, Nu's own dependency (in the installers and in a checkout's.venv) →uvonPATH, only if Nu has none of its own.test_find_uv_prefers_its_own_uv_to_the_path, and thePATHfallback now applies only when there's no uv package.docs/environment.md(which uv Nu uses, andMU_UV),docs/packaging.md, CHANGES.md, CLAUDE.md.Note for development: in a checkout, Nu now uses the
.venv's pinned uv (fromuv.lock) rather than one on yourPATH. SetMU_UVto use another.Tested
mkdocs build --strictclean.find_uv()now returns.venv\Scripts\uv.exeeven though uv 0.11.26 is onPATH.🤖 Generated with Claude Code