We're hitting GitHub concurrency limits (organization wide limit of 60
jobs), and while we could move to paid runners with high concurrency
limits, I'd prefer to stay on the free runners and some of these jobs,
e.g., `test-system`, require GitHub runners.
This moves a bunch of our extended testing behind a label, e.g.,
`test:extended` or `test:system`, and only runs them on `main` by
default.
These are hitting OIDC failures on Depot and run for 30m consuming a lot
of CI concurrency.
These timeouts are based on historical data retrieved by Claude.
https://discuss.python.org/t/pep-819-json-package-metadata/105558
Add an experimental JSON format for METADATA and WHEEL files in the uv
build backend to have a reference what it would look like and to
demonstrate that the actual change is just a few lines, how much easier
it is than the existing email header format.
The change is overwhelmingly adding the preview feature as it's the
first preview item in the build backend, writing the actual JSON is only
a couple of lines.
---------
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
Following #16918, mark additional system-level settings as
`uv_toml_only` so they don't appear in the `pyproject.toml`
documentation examples:
- `native-tls`
- `cache-dir`
- `python-install-mirror`
- `pypy-install-mirror`
- `python-downloads-json-url`
Eventually, we'll want to ban these in the `pyproject.toml` without some
opt-in.
Co-authored-by: Claude <noreply@anthropic.com>
Ignore that the file matching is a little redundant with other checks,
I'll consolidate those in a subsequent pull request.
Co-authored-by: Claude <noreply@anthropic.com>
The goal here is to reduce cache consumption and contention by avoiding
cache saves on pull requests unless the pull request makes a change that
requires a new cache entry.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This is included in the Rust cache key hash because it is prefixed with
`RUST_` but has no affect on compilation. This invalidates caches that
could be shared across jobs.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [h2](https://redirect.github.com/hyperium/h2) | workspace.dependencies
| patch | `0.4.12` → `0.4.13` |
---
### Release Notes
<details>
<summary>hyperium/h2 (h2)</summary>
###
[`v0.4.13`](https://redirect.github.com/hyperium/h2/blob/HEAD/CHANGELOG.md#0413-January-5-2026)
[Compare
Source](https://redirect.github.com/hyperium/h2/compare/v0.4.12...v0.4.13)
- Add support for 1xx informational responses on client and server side.
- Fix auto-releasing of padding bytes of DATA frames for flow control
windows.
- Fix to stop assigning capacity to pending streams which can't use it
yet.
- Fix tracing to not grab the parent for the connection span.
</details>
---
### Configuration
📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on
Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule
defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/uv).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43NC41IiwidXBkYXRlZEluVmVyIjoiNDIuNzQuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Copies astral-sh/ruff#22126
We can use a larger _and_ less expensive runner for the build step.
Total runtime went from 18m -> 15m and most of that time is no longer on
the benchmark runner.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Yet another attempt at #5714 to see if it improves CI times now that
Windows test times have increased
I think this is worth it now
```
main (1 shard): 13m 46s
branch (2 shards): 10m 31s
branch (3 shards): 7m 34s
```
total time (a.k.a., cost increase)
```
main (1 shard): 13m 46s
branch (2 shards): 20m 18s
branch (3 shards): 21m 32s
```
As in #875, we could explore moving the build step before the sharded
test runs. The build is 3m of the runtime, but I think artifact transfer
and runner startup time was too expensive last time and I don't expect
it to be faster. It might save a bit on CI cost, but I'm not super
worried about that.
I chose three shards due to a reasonable reduction in per-shard runtime
without a big increase in total runtime (compared to two shards). I
think since half of the shard runtime is fixed build time (vs reducable
test time), going up to more shards would be wasteful.
We use a hash-based strategy for test splitting, which means adding
tests will never move tests across shards.
I moved _off_ of the Depot runner because the "checkout" setup is taking
_way_ too long, about 120s more than the GitHub one which, once we split
over multiple shards, overcomes the speed benefits of the Depot runners.
The downsides here are:
1. Increased total CI time and therefore increased cost
2. GitHub runners are more expensive than Depot runners
3. Failing tests can be split across multiple shards, requiring more
GitHub UI navigation
(1) The runtime is unacceptably slow and I think the cost increase is
fairly marginal
(2) We can move back to Depot runners once they resolve the specific
performance issue
(3) Failing tests on Windows without failing tests on Linux are fairly
rare and should often be isolated to a single shard
---------
Co-authored-by: Claude <noreply@anthropic.com>
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
Fixes#17210.
## Test Plan
Added a test function.
Co-authored-by: Zanie Blue <contact@zanie.dev>
Resolves https://github.com/astral-sh/uv/issues/16846,
https://github.com/astral-sh/uv/issues/16813
This diff adds support for disabling `exclude-newer` for specific
packages using `<name>=false`. This allows packages
without upload dates (e.g., CPU-only PyTorch wheels from custom indices)
to be resolved when a global `exclude-newer` is set, without disabling
it globally.
---------
Co-authored-by: Zanie Blue <contact@zanie.dev>
The Windows registry test (PEP 514 integration) tests Python
installation registration functionality rather than system Python
detection like the other tests in test-system, so it fits better in
test-integration.
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
This changes how the `download-metadata.json` file is generated for
Pyodide.
Previously, if we have a different Pyodide version with a same Python
version, the older Pyodide version is selected.
For example, say we have
- Pyodide 0.29.0 with Python 3.13.2
- Pyodide 0.28.3 with Python 3.13.2
then, pyodide 0.28.3 was stored in `download-metadata.json` as we
iterate in decending order with overwriting the value that was
previously written.
I fixed it by picking up the latest Pyodide version for each Python
version.
## Test Plan
Ran `uv run -- crates/uv-python/fetch-download-metadata.py` locally, and
verified the output:
```
2026-01-09 15:39:23 INFO Fetching Pyodide checksums: 0/4
2026-01-09 15:39:24 INFO Selected cpython-3.13.2-emscripten-wasm32-musl (0.29.1)
2026-01-09 15:39:24 INFO Selected cpython-3.12.7-emscripten-wasm32-musl (0.27.7)
2026-01-09 15:39:24 INFO Selected cpython-3.12.1-emscripten-wasm32-musl (0.26.4)
2026-01-09 15:39:24 INFO Selected cpython-3.11.3-emscripten-wasm32-musl (0.25.1)
```
We get a bunch of redundant skipped `Release / Build binary ...` jobs in
CI otherwise, and I would rather the release workflow didn't have a pull
request trigger at all.
Follows #17388
## Summary
Given `uv run foo/bar.py`, we now detect the workspace starting at
`foo/bar.py`, rather than the current working directory. I think this is
much more intuitive as demonstrated by the new test.
This change is currently in preview, but would ship as a breaking change
in v0.10.
This file is too big for an LLM context window and several contributors
have complained about it being too scary to touch.
This also gets us collapsible sections in the UI.
I renamed some jobs for clarity in the meantime. And added a meta-job
for required checks passing so we can avoid churn in our "Settings" when
we change job names.
Note this was entirely refactored by Claude.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
## Summary
Implement #16408.
Currently doesn't avoid recompiling the bytecode when it is already
compiled which should be fine since the compiler script skips things
which are already compiled.
pyodide is currently unsupported due to it using a zip for its standard library
and also because it misreports the location of the standard library.
## Test Plan
Styling of the status report was manually tested, there is a new test
for testing the actual functionality.
## Summary
Closes https://github.com/astral-sh/uv/issues/17331
Certain applications on windows expect to be notified when environment
variables change such as conhost.exe (traditional cmd.exe host).
Without this notification conhost.exe will not pick up changes to
environment variables regardless of how many times conhost.exe is
re-launched after running `uv tool update-shell`.
## Test Plan
Before this change
1. Removed `%USERPROFILE%\.local\bin` from environment variables via UI
(which sends `WM_SETTINGCHANGE`)
2. Launched `%SYSTEMROOT%\System32\conhost.exe` and attempted to run any
tool preivously installed. It fails to find any.
3. Ran `uv tool update-shell`. Confirmed
`HKEY_CURRENT_USER\Environment\Path` was updated in registry.
4. Launched new `%SYSTEMROOT%\System32\conhost.exe` session. **Fails to
find installed tools**.
After this change
1. Removed `%USERPROFILE%\.local\bin` from environment variables via UI
(which sends `WM_SETTINGCHANGE`)
2. Launched `%SYSTEMROOT%\System32\conhost.exe` and attempted to run any
tool preivously installed. It fails to find any.
3. Ran `uv tool update-shell`. Confirmed
`HKEY_CURRENT_USER\Environment\Path` was updated in registry.
4. Launched new `%SYSTEMROOT%\System32\conhost.exe` session. **Finds the
installed tools**.
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
fix https://github.com/astral-sh/uv/issues/17174 mentioned the invalid
issues here:
results of diagnostics:
before:
```
--- TRAMPOLINE DIAGNOSTICS: STARTUP ---
STDIN: Handle=184
-> Console Mode: 503
STDOUT: Handle=536
-> Console Mode: 7
STDERR: Handle=540
-> Console Mode: 7
-------------------------------------------
--- TRAMPOLINE DIAGNOSTICS: AFTER CLOSE_HANDLES ---
STDIN: INVALID
STDOUT: INVALID
STDERR: Handle=540
-> Console Mode: 7
```
after:
```
--- TRAMPOLINE DIAGNOSTICS: STARTUP ---
STDIN: Handle=716
-> Console Mode: 503
STDOUT: Handle=580
-> Console Mode: 7
STDERR: Handle=604
-> Console Mode: 7
-------------------------------------------
--- TRAMPOLINE DIAGNOSTICS: AFTER CLOSE_HANDLES ---
STDIN: Handle=716
-> Console Mode: 503
STDOUT: Handle=580
-> Console Mode: 7
STDERR: Handle=604
-> Console Mode: 7
```
the problem was we were closing the handlers whatever they were from
pipes (byte streams) or consoles, this will make sure we close only the
handlers from pipes by using `FILE_TYPE_PIPE`
## Test Plan
<!-- How was it tested? -->
completely manual by adding debug statements and running a simple script
to open the pdb.