Repository navigation
Release 0.13.0 - #22092
Merged
Merged
Release 0.13.0#22092
Conversation
zanieb
added a commit
that referenced
this pull request
Sep 30, 2026
## Summary New virtual environments on Python 3.10 and later omit `_virtualenv.py` and `_virtualenv.pth` by default. Python 3.9 and earlier retain the distutils configuration patch. Existing environments are left alone until recreated. Remove the preview gate, feature declaration, and unused `uv-virtualenv` preview dependency, and add the 0.13 migration note. The existing unknown-feature handling allows old `--preview-features no-distutils-patch` invocations to continue with a warning. Cover the 3.9/3.10 boundary, seeded environments, the removed feature name, and recreation of existing environments. Fixes #20791. Targets `release/0.13.0` for #22092.
uv test inventory changesThis PR changes the tests when compared with the
|
charliermarsh
force-pushed
the
release/0.13.0
branch
from
October 1, 2026 16:35
10930fd to
3d5657f
Compare
charliermarsh
pushed a commit
that referenced
this pull request
Oct 1, 2026
## Summary New virtual environments on Python 3.10 and later omit `_virtualenv.py` and `_virtualenv.pth` by default. Python 3.9 and earlier retain the distutils configuration patch. Existing environments are left alone until recreated. Remove the preview gate, feature declaration, and unused `uv-virtualenv` preview dependency, and add the 0.13 migration note. The existing unknown-feature handling allows old `--preview-features no-distutils-patch` invocations to continue with a warning. Cover the 3.9/3.10 boundary, seeded environments, the removed feature name, and recreation of existing environments. Fixes #20791. Targets `release/0.13.0` for #22092.
charliermarsh
temporarily deployed
to
automations
October 1, 2026 16:37 — with
GitHub Actions
Inactive
charliermarsh
temporarily deployed
to
automations
October 1, 2026 16:51 — with
GitHub Actions
Inactive
Merging this PR will not alter performance
|
zanieb
added a commit
that referenced
this pull request
Oct 7, 2026
## Summary New virtual environments on Python 3.10 and later omit `_virtualenv.py` and `_virtualenv.pth` by default. Python 3.9 and earlier retain the distutils configuration patch. Existing environments are left alone until recreated. Remove the preview gate, feature declaration, and unused `uv-virtualenv` preview dependency, and add the 0.13 migration note. The existing unknown-feature handling allows old `--preview-features no-distutils-patch` invocations to continue with a warning. Cover the 3.9/3.10 boundary, seeded environments, the removed feature name, and recreation of existing environments. Fixes #20791. Targets `release/0.13.0` for #22092.
Add an unreleased `0.13.0` section so the breaking changes can carry their release notes as they are introduced.
Move the `0.12.x` release notes into `changelogs/0.12.x.md` and keep a link from `CHANGELOG.md`. The archived releases use the same ascending order as the earlier series.
## Summary New virtual environments on Python 3.10 and later omit `_virtualenv.py` and `_virtualenv.pth` by default. Python 3.9 and earlier retain the distutils configuration patch. Existing environments are left alone until recreated. Remove the preview gate, feature declaration, and unused `uv-virtualenv` preview dependency, and add the 0.13 migration note. The existing unknown-feature handling allows old `--preview-features no-distutils-patch` invocations to continue with a warning. Cover the 3.9/3.10 boundary, seeded environments, the removed feature name, and recreation of existing environments. Fixes #20791. Targets `release/0.13.0` for #22092.
Tar archives still use `astral-tokio-tar` unless the `tar-codec` preview feature is enabled. Make `tar-codec` the default for extraction, `uv_build` source distributions, and publishing metadata, with `UV_LEGACY_TAR_BACKEND=1` available for workflows that need the previous backend. Resolve the tar choice once per build context, download operation, or publishing session and pass it through archive operations. Document the stricter archive handling in the `0.13.0` changelog.
Native ARM64 builds of uv currently prefer emulated x86-64 Python on Windows. Prefer native `aarch64` Python across Python versions, with `x86_64` ahead of 32-bit `x86` when no native distribution is available. Explicit architecture requests continue to select emulated Python. Ports astral-sh#2207 and adds the 0.13 breaking-change entry. Land #22098 and #22099 on `main` first, then bring them into the 0.13 release before landing this change. They provide the persistent `UV_PYTHON_ARCH=x86_64` opt-out and retain compatible x86-64 wheels for Windows ARM environment markers.
Reapplies #22052 for 0.13. We now update the HTTP cache policy in place on a 304 response, avoiding a rewrite of the cached payload. The format change bumps the six cache buckets containing HTTP responses. Original benchmarks from #22052 on Linux/ext4, with 96 entries and 16 concurrent requests per batch (`c9dab42be` → `1562e401b`, using SeaHash): | Warm-cache workload | Main | PR | Paired change | |---|---:|---:|---:| | 304 refresh, 256 KiB | 80.39 ms | 9.84 ms | 87.4% faster | | 304 refresh, 1 MiB | 323.20 ms | 17.59 ms | 94.6% faster | | Fresh reads, 4 KiB | 0.711 ms | 0.712 ms | Approximately unchanged | | Fresh reads, 256 KiB | 2.140 ms | 2.112 ms | 2.9% faster | | Fresh reads, 1 MiB | 7.529 ms | 7.698 ms | No clear difference |
Reapplies #22059 for 0.13. We store source-distribution revision IDs as `uv_fastid::Id`, avoiding the `String` allocation when creating or cloning them. IDs still serialize as strings. The `sdists-v10` bump allows us to reject legacy 21-character IDs.
Reapplies #22060 for 0.13. We serialize `HashDigest` directly with Serde and rkyv, removing the legacy `HashDigestWire` adapter. Archived digests validate their length and hexadecimal characters through `Digest<BYTES>` and normalize to lowercase on deserialization. The cache bumps cover the source-distribution, wheel, simple-index, and flat-index buckets that contain these hashes. Lockfile and index hash formats are unchanged.
Reapplies #22061 for 0.13. We derive `Serialize` for `Revision` and `Archive`, writing MessagePack arrays instead of maps. This removes the custom serializers and saves 15 bytes per source revision and 32 bytes per wheel archive record. The `sdists-v10` and `wheels-v7` bumps remove the need to support older readers that cannot accept the added `size` field.
Reapplies #22062 for 0.13. We use `WheelFilename::cache_key()` for Windows wheel download, extraction, and metadata locks, limiting lock filenames to 69 characters, including `.lock`. This covers both PEP 658 metadata requests and the range-request fallback. The `wheels-v7` and `sdists-v10` bumps remove the need to share lock filenames with older uv versions.
Reapplies #22078 for 0.13. We store the same HTTP cache information in fewer bytes, without changing cache freshness or revalidation behavior. - **Booleans become bits.** Ten fields like `no_cache`, `no_store`, and `immutable` each occupied a byte. We pack them into bits of one integer. - **Optional numbers share their presence flags.** Each archived `Option<u64>` occupies 16 bytes: the number, an indicator of whether it exists, and alignment padding. We store the numbers together and use one bit per number to indicate whether it exists. For example, `max_age = None` and `max_age = Some(0)` both store the number `0`, but their presence bits differ. Getters reconstruct the normal `Option<u64>`. We apply this to cache-control directives and response timestamps. The fixed archived policy shrinks from **320 to 200 bytes**. We use `bitflags` for typed flag operations and retain endian-aware integers in the archived representation. The cache bucket bumps cover the new representation.
Reapplies #22079 for 0.13. We align HTTP cache policies within the payload buffer and access them directly after validation, removing a separate allocation and copy from every cache read. Extracting the payload reuses the same allocation. The file adds up to 15 bytes of padding, covered by the CRC32. Policy validation is restricted to its own slice, and refreshes retain the entry ID check before overwriting the policy.
Editable `-e` requirements in constraints files included with `-c` are silently discarded. Reject these requirements with an error that identifies the constraints file. See [pip's constraints documentation](https://pip.pypa.io/en/stable/user_guide/#constraints-files) and [pip's editable-constraint rejection](https://github.com/pypa/pip/blob/main/src/pip/_internal/req/req_install.py#L824-L832). --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
Quoted constraint, override, and exclude paths are split on spaces and fail on the path prefix. Keep explicit CLI paths intact and only split environment-provided lists. This fixes [uv#12639](#12639) and removes the undocumented behavior of supplying several CLI paths in one space-delimited value ([uv#3162](#3162), [uv#4124](#4124)). --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
A `--require-hashes` directive inside a constraints file included by a requirements file is silently discarded, allowing packages without hashes to install. Propagate hash enforcement from included constraints into the parent requirements. Installs that previously ignored this directive now fail when a requirement is missing a hash. --------- Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
Document the planned switch to Python 3.15 as the default stable interpreter in the `0.13.0` changelog. Explain when uv downloads the new version and how existing interpreters and explicit version pins affect selection.
zanieb
marked this pull request as ready for review
October 9, 2026 17:37
zanieb
added a commit
that referenced
this pull request
Oct 9, 2026
## Summary New virtual environments on Python 3.10 and later omit `_virtualenv.py` and `_virtualenv.pth` by default. Python 3.9 and earlier retain the distutils configuration patch. Existing environments are left alone until recreated. Remove the preview gate, feature declaration, and unused `uv-virtualenv` preview dependency, and add the 0.13 migration note. The existing unknown-feature handling allows old `--preview-features no-distutils-patch` invocations to continue with a warning. Cover the 3.9/3.10 boundary, seeded environments, the removed feature name, and recreation of existing environments. Fixes #20791. Targets `release/0.13.0` for #22092.
zanieb
pushed a commit
that referenced
this pull request
Oct 9, 2026
## Summary A source build can change its dependencies with `--config-settings`, but uv looks up cached metadata before applying those settings to the cache key. A later `uv pip compile` can therefore resolve the dependencies from an earlier build. `uv pip install` can even exit successfully with the wrong dependencies and leave an environment that fails `uv pip check`. Concurrent commands expose this readily, but two sequential commands sharing a cache also reproduce it. Resolve dynamic metadata under the same build settings shard used for the wheel, across registry, URL, path, directory, and Git sources. This also accounts for extra build dependencies and variables already included in the wheel key. This relies on the source-distribution cache bump already included in the 0.13 stack (#22092). It retains `sdists-v10` and `metadata.msgpack`; there is no additional bucket or filename bump. This should land before 0.13.0 is released so the corrected layout ships with the new bucket.
astral-automations-bot Bot
pushed a commit
to astral-sh/uv-dev
that referenced
this pull request
Oct 10, 2026
## Summary New virtual environments on Python 3.10 and later omit `_virtualenv.py` and `_virtualenv.pth` by default. Python 3.9 and earlier retain the distutils configuration patch. Existing environments are left alone until recreated. Remove the preview gate, feature declaration, and unused `uv-virtualenv` preview dependency, and add the 0.13 migration note. The existing unknown-feature handling allows old `--preview-features no-distutils-patch` invocations to continue with a warning. Cover the 3.9/3.10 boundary, seeded environments, the removed feature name, and recreation of existing environments. Fixes astral-sh#20791. Targets `release/0.13.0` for astral-sh#22092.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.