uv/crates/uv-cli
Zanie Blue 61fcdfb2e4 Allow -p to use complex Python version requests in uv pip compile (#11486)
Closes #11285
Closes https://github.com/astral-sh/uv/pull/11437

This changes `-p` from an alias of `--python-version` to `--python`
while retaining backwards compatibility for `--python-version`-like
fallback behavior when the requested version, e.g., `-p 3.12`, cannot be
found.

This was initially implemented with a hidden `--python-legacy` flag
which allows us to special case the short `-p` flag — unlike the
implementation in #11437. However, after further discussion, we decided
the behavior difference between `-p` and `--python` would be confusing
so now `-p` is an alias for `--python` and `--python` is special-cased
when a version is used.

Additionally, we now respect the `UV_PYTHON` environment variable, but
it is ignored when `--python-version` is set. If you want different
`--python-version` and `--python` values, you must do so explicitly. I
considered banning this, but it is valid for e.g. `--python pypy
--python-version 3.12`
2025-02-13 16:17:49 -06:00
..
src Allow -p to use complex Python version requests in uv pip compile (#11486) 2025-02-13 16:17:49 -06:00
build.rs Fix commits_since_last_tag in version info (#9730) 2024-12-09 09:43:27 -06:00
Cargo.toml chore(uv): more env var mappings (#8193) 2024-10-15 07:59:03 -04:00