mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Simplify managed Python flags (#12246)
Currently, for users to specify at the command line whether to use uv-managed or system Python interpreters, they use the `--python-preference` parameter, which takes four possible values. This is more complex than necessary since the normal case is to either say "only managed" or "not managed". This PR hides the old `--python-preference` parameter from help and documentation and adds two new flags: `--managed-python` and `--no-managed-python` to capture the "only managed" and "not managed" cases. I have successfully tested this locally but currently cannot add snapshot tests because of problems with distinguishing managed vs. system interpreters in CI (and non-determinism when run on different developers' machines). The `--python-preference` test in `tool-install.rs` is currently ignored for this reason. See #5144 and #7473. --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
parent
e9d2b6ecea
commit
f66ce58a09
8 changed files with 569 additions and 716 deletions
|
@ -179,6 +179,10 @@ Add additional context and structure to log messages.
|
|||
|
||||
If logging is not enabled, e.g., with `RUST_LOG` or `-v`, this has no effect.
|
||||
|
||||
### `UV_MANAGED_PYTHON`
|
||||
|
||||
Require use of uv-managed Python versions.
|
||||
|
||||
### `UV_NATIVE_TLS`
|
||||
|
||||
Equivalent to the `--native-tls` command-line argument. If set to `true`, uv will
|
||||
|
@ -229,6 +233,10 @@ Ignore `.env` files when executing `uv run` commands.
|
|||
|
||||
Skip writing `uv` installer metadata files (e.g., `INSTALLER`, `REQUESTED`, and `direct_url.json`) to site-packages `.dist-info` directories.
|
||||
|
||||
### `UV_NO_MANAGED_PYTHON`
|
||||
|
||||
Disable use of uv-managed Python versions.
|
||||
|
||||
### `UV_NO_PROGRESS`
|
||||
|
||||
Equivalent to the `--no-progress` command-line argument. Disables all progress output. For
|
||||
|
@ -343,8 +351,7 @@ Distributions can be read from a local directory by using the `file://` URL sche
|
|||
|
||||
### `UV_PYTHON_PREFERENCE`
|
||||
|
||||
Equivalent to the `--python-preference` command-line argument. Whether uv
|
||||
should prefer system or managed Python versions.
|
||||
Whether uv should prefer system or managed Python versions.
|
||||
|
||||
### `UV_REQUEST_TIMEOUT`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue