uv/crates/uv-python
Zanie Blue 4df0fe9a01
Update the interface for declaring Python download preferences (#5936)
The loose consensus is that "fetch" doesn't have much meaning and that a
boolean flag makes more sense from the command line.

1. Adds `--allow-python-downloads` (hidden, default) and
`--no-python-downloads` to the CLI to quickly enable or disable
downloads
2. Deprecates `--python-fetch` in favor of the options from (1)
3. Removes  `python-fetch` in favor of a `python-downloads` setting
5. Adds a `never` variant to the enum, allowing even explicit installs
to be disabled via the configuration file

## Test plan

I tested this with various `pyproject.toml`-level settings and `uv venv
--preview --python 3.12.2` and `uv python install 3.12.2` with and
without the new CLI flags.
2024-08-09 13:10:19 -05:00
..
python Change "toolchain" to "python" (#4735) 2024-07-03 07:44:29 -05:00
src Update the interface for declaring Python download preferences (#5936) 2024-08-09 13:10:19 -05:00
Cargo.toml Enforce extension validity at parse time (#5888) 2024-08-08 21:39:47 -04:00
download-metadata.json Update bundled Pythons to include stripped variants (#5469) 2024-07-26 00:34:45 +00:00
fetch-download-metadata.py Deprecate the --isolated flag (#5466) 2024-07-30 22:40:38 +00:00
template-download-metadata.py Deprecate the --isolated flag (#5466) 2024-07-30 22:40:38 +00:00