Manage Python with uv + 7-day minimum release age#23
Open
akan72 wants to merge 1 commit into
Open
Conversation
- Add uv/uv.toml with exclude-newer = "7 days" (rolling supply-chain window: never resolve a package release younger than a week) and python-preference = "managed" so uv owns Python version management - Symlink uv/uv.toml -> ~/.config/uv/uv.toml in assimilate.sh (also discovered via $XDG_CONFIG_HOME) - Add brew "uv" to the Brewfile and run 'uv python install' during assimilate to install a uv-managed CPython on fresh machines
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
Manage Python with uv, with a rolling 7-day minimum release age for supply-chain safety. (Additional request, not in the original branch plan.)
uv/uv.tomlwith:exclude-newer = "7 days"— a rolling window (a duration, not a fixed date) so uv never resolves a package release younger than a week. Most malicious/compromised uploads are detected and yanked within that window.python-preference = "managed"— uv owns Python version management (install withuv python install <ver>, pin per-project via.python-version).uv/uv.toml→~/.config/uv/uv.tomlinassimilate.sh(also discovered via$XDG_CONFIG_HOME).brew "uv"to the Brewfile and runuv python installduring assimilate to install a uv-managed CPython on fresh machines.Notes
exclude-neweraccepting a duration string was verified against the installed uv (0.11.6); an invalid value is rejected at parse time, a valid"7 days"is accepted.uv.toml(the[tool.uv]table form is only forpyproject.toml).Why & alternatives
exclude-newer = "7 days"exclude-newerdate (must be bumped manually); no protection at all.python-preference = "managed"python3.11aliases / pyenv.only-managedto forbid system interpreters entirely.brew "uv"+uv python install