uv/crates/uv-cli
Zanie Blue e0fae8e6f4
Add uv python pin (#4950)
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
2024-07-10 16:52:24 +00:00
..
src Add uv python pin (#4950) 2024-07-10 16:52:24 +00:00
build.rs Add standalone CLI crate (#4456) 2024-06-24 06:16:22 -04:00
Cargo.toml Allow constraints to be provided in --upgrade-package (#4952) 2024-07-09 20:09:13 -07:00