mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
![]() Adds a `uv python pin` command to write to a `.python-version` file. We support all of our Python version request formats. We also support a `--resolved` flag to pin to a specific interpreter instead of the provided version. We canonicalize the request with #4949, it's not just printed verbatim. We always attempt to find the interpreter so we can warn if it's not available. With `--resolved`, if we can't find the interpreter we fail. If no arguments are provided, we'll attempt to display the current pin. In the future: - We should confirm that this satisfies the `Requires-Python` metadata if a `pyproject.toml` is present - We should support writing to a `uv.python-version` field if `pyproject.toml` or `uv.toml` are present - We should support finding and updating the "nearest" Python version file (looking in ancestors) - We should support finding version files in workspaces - We should support some sort of global pin |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml |