uv/crates/uv-python/src
Zanie Blue b38edb9b7d
Allow Python requests with missing segments (#14399)
This allows `PythonDownloadRequest` which is used for parsing general
install key requests to have missing segments, which unblocks requests
like `windows-aarch64` or `cpython-linux` (whereas before those would
require `any-any-windows-aarch64` and `cpython-any-linux` respectively).
We still require strict ordering of segments.

Previously, we only allowed missing segments at the end of the key.

This uses a state machine for parsing, which is quite a bit more
complicated.

I'm a little hesitant about the possibility that this regresses error
messages and the complexity of the implementation, but `uv run -p
aarch64` seems valuable following #13724. The alternative to this would
probably be to make these explicit in various places? e.g., expose
`--python-arch`, `--python-libc`, and `--python-os`? Or make
`--python-platform` (which already exists) accept a subset of the keys?

There is a possibility of regressions here, e.g., if something matches
this parser it will not fallback to the `PythonRequest::ExecutableName`
case and we've made this parser more permissive, but I think that should
be quite rare?
2025-08-13 11:03:09 -05:00
..
sysconfig Sync latest Python releases (#15186) 2025-08-09 00:43:10 +00:00
discovery.rs Refactor os, arch, and libc information into a shared Platform type (#15027) 2025-08-13 09:02:55 -05:00
downloads.rs Allow Python requests with missing segments (#14399) 2025-08-13 11:03:09 -05:00
environment.rs Update Rust toolchain to 1.89 (#15157) 2025-08-08 13:01:52 +00:00
implementation.rs Use the canonical ImplementationName -> &str implementation (#14337) 2025-06-28 09:42:18 -05:00
installation.rs Refactor os, arch, and libc information into a shared Platform type (#15027) 2025-08-13 09:02:55 -05:00
interpreter.rs Refactor os, arch, and libc information into a shared Platform type (#15027) 2025-08-13 09:02:55 -05:00
lib.rs Include all site packages directories in ephemeral environment overlays (#15121) 2025-08-08 13:49:21 -05:00
macos_dylib.rs Install and remove managed Python to and from the Windows Registry (PEP 514) (#10634) 2025-01-23 14:13:41 +00:00
managed.rs Refactor os, arch, and libc information into a shared Platform type (#15027) 2025-08-13 09:02:55 -05:00
microsoft_store.rs Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
pointer_size.rs Change "toolchain" to "python" (#4735) 2024-07-03 07:44:29 -05:00
prefix.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
python_version.rs Fix optional cfg gates (#14448) 2025-07-03 15:29:03 -05:00
target.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
version_files.rs Make the use of Self consistent. (#15074) 2025-08-05 20:17:12 +01:00
virtualenv.rs Make the use of Self consistent. (#15074) 2025-08-05 20:17:12 +01:00
windows_registry.rs Split platform detection code into a dedicated uv-platform crate (#14918) 2025-07-28 14:12:04 -05:00