## Summary
Pull in metadata from python-build-standalone 20260610 which includes
CPython 3.13.14 and 3.14.6
Note that this includes the change from #19786
---------
Co-authored-by: Tomasz (Tom) Kramkowski <tom@astral.sh>
## Summary
This PR deliberately relaxes the single integration-test harness
introduced in [#8093](https://github.com/astral-sh/uv/pull/8093). In
2024, `uv` had 41 top-level integration-test targets and a nextest run
saw 91 binaries across the workspace. Shared test support was compiled
into many of those targets, and the original benchmark improved from
roughly 35 seconds to 9-14 seconds after consolidation.
Since then, shared test infrastructure has moved into the separately
compiled `uv-test` crate in
[#17551](https://github.com/astral-sh/uv/pull/17551), while the suite
has grown to 62 integration-test source modules and 2,958 tests. The
remaining single executable has therefore become a large link unit:
changing one localized test relinks the entire integration suite.
This PR groups those 62 modules into 12 coarse command-area harnesses.
It does not restore one harness per source file, and it keeps the tests
in the existing `uv` package with standard Cargo binary discovery. Each
harness owns a top-level directory containing its `main.rs` and test
modules, making membership visible without `#[path]` indirection. The
groups are coarse compilation boundaries rather than a strict product
taxonomy. Shared PyPI proxy support moves into `uv-test` so it can be
reused by the independent harnesses. The reorganization preserves the
exact 2,958-test inventory and suite assignments used by the benchmarks
below.
To compare the tradeoff directly, I derived one-, 12-, and 62-harness
layouts from the same commit. Each edit used a new compile-affecting
marker, with five interleaved warm rounds for the no-op and edit cases
and three rounds after cleaning the `uv` package. Total time includes
both `cargo test --package uv --tests --no-run --locked` and subsequent
nextest test discovery.
| Layout | Harnesses | No-op | Localized test edit | Shared `uv-test`
edit | `uv` package rebuild | Integration executable size |
| -------- | --------: | ----: | ------------------: |
--------------------: | -------------------: |
--------------------------: |
| Single | 1 | 1.10s | 7.52s | 10.20s | 35.18s | 96.5 MiB |
| This PR | 12 | 1.22s | 2.60s | 7.60s | 33.30s | 591.2 MiB |
| Per-file | 62 | 2.01s | 2.58s | 17.51s | 42.95s | 1,700.9 MiB |
The 12-harness layout captures effectively all of the per-file benefit
for localized edits: 2.60 seconds versus 2.58 seconds. It avoids the
per-file penalties for shared edits, package rebuilds, executable
discovery, and disk usage. On this machine, it also outperformed the
single harness for shared edits and package rebuilds because the giant
single link unit outweighed the additional parallel link targets. All
three layouts discovered the same 2,958 tests.
CI timing is effectively unchanged. Compared with the median of three
adjacent `main` runs, two complete warm PR attempts produced:
| Job | `main` median | PR attempt 1 | PR attempt 2 | Warm PR median |
| ------------------ | ------------: | -----------: | -----------: |
-------------: |
| Linux | 4:23 | 4:29 | 4:44 | 4:37 |
| macOS | 9:40 | 9:35 | 7:54 | 8:45 |
| Windows 1 of 3 | 4:00 | 4:09 | 3:54 | 4:02 |
| Windows 2 of 3 | 3:45 | 4:22 | 4:36 | 4:29 |
| Windows 3 of 3 | 3:51 | 3:54 | 4:25 | 4:10 |
| Runner-minutes sum | 25:53 | 26:29 | 25:33 | 26:01 |
| Slowest test job | 9:40 | 9:35 | 7:54 | 8:45 |
The warm PR median changes aggregate runner time by +0:08 (+0.5%) and
reduces the observed slowest test job by 0:55. The `main` runs and first
PR attempt used partial Rust cache hits, while the rerun used exact
cache hits, so the per-platform differences should be treated as runner
and cache variance rather than a reliable clean-CI speedup.
This is the narrower alternative discussed in #19603.
## Summary
This expands the usage of global preview in a key area which has
wide-ranging impact.
Key notes:
* uv-dev needs to set up default global preview because of this.
Although it seems like it should technically have been setting it up
earlier?
* A number of tests no longer pass `Preview::default()` but also don't
use the guard. This is because they only call into the preview stuff
when the relevant conda environment variables are present. Which we
assume they're not (otherwise the tests would be invalid for other
reasons). There's really a hermeticity issue here, but I've addressed it
in a separate PR.
## Test Plan
Tests have been modified, but existing coverage should be sufficient.
## Summary
Keep the sysconfig generator aware of compiler paths that appeared in
older downloadable `python-build-standalone` releases, so regenerating
the mappings on current `main` does not drop support for previously
shipped aarch64 and riscv64 binaries.
## Context
uv patches compiler paths embedded in managed Python `sysconfig` data to
use portable `cc` and `c++` commands. These mappings are generated from
the current python-build-standalone targets.
Older python-build-standalone releases remain downloadable and retain
the compiler paths used when they were built. When a target changes
toolchains or is removed from the current targets, regenerating the
mappings silently drops support for those releases.
This previously removed the aarch64 GNU mappings. The upcoming
python-build-standalone sync in #19531 would similarly replace the
riscv64 GNU mappings with LLVM mappings.
## Test plan
I've manually verified, that before this patch, on an arm64 linux box:
```
% uvx python3.12.10 -c 'import sysconfig; print(sysconfig.get_config_var("CC"))'
/usr/bin/aarch64-linux-gnu-gcc -pthread
```
and after (after uninstalling the python version using `uv python
uninstall 3.12.10`):
```
% ./target/debug/uvx python3.12.10 -c 'import sysconfig; print(sysconfig.get_config_var("CC"))'
cc -pthread
```
This makes it easier for us to add resolver scenarios by
1. Rewriting the scenario package generation in Rust
2. Serving scenario packages from memory in a wiremock index
3. Rewriting the scenario test case generation in Rust
4. Dropping all dependencies on packse / the packse index
---------
Co-authored-by: Codex <noreply@openai.com>
Fix the malformed `<a href=...>` tag emitted for positional arguments in
`crates/uv-dev/src/generate_cli_reference.rs`, which produced invalid
HTML in the generated CLI reference.
See https://github.com/astral-sh/uv/issues/18890
We can load a certificate that is a valid bundle, but on client build we
can fail if the certificate is unsupported for various reasons. This
propagates the error instead of panicking.