9053 Commits

Author SHA1 Message Date
renovate[bot] 9291119d4e Update CodSpeedHQ/action action to v4.13.0 (#18985) 2026-04-13 09:08:58 -04:00
renovate[bot] 69cee2104b Update Rust crate insta to v1.47.2 (#18984) 2026-04-13 09:08:48 -04:00
renovate[bot] 99039c0547 Update Rust crate indexmap to v2.13.1 (#18983) 2026-04-13 09:08:39 -04:00
Zanie Blue d4a45991bc Fix equality comparisons for version specifiers with ~= operators (#18960)
As noted in
https://github.com/astral-sh/uv/issues/17549#issuecomment-4217783165,
the current behavior is incorrect

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-13 07:16:55 -05:00
konsti e883bfe462 Stronger Windows path normalization (#18945)
Currently, path normalization doesn't catch some cases, such as
`foo//bar` or `foo/./bar`, because they are not shown as components. By
checking whether the normalized version build from iterating over
components would be the same length as the current path, we can check
whether we need to normalize, without allocating when the path is
already normalized.

---------

Co-authored-by: Tomasz Kramkowski <tom@astral.sh>
2026-04-13 09:12:06 +00:00
renovate[bot] 78e6cbf54e Update dependency astral-sh/uv to v0.11.6 (#18982)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [astral-sh/uv](https://redirect.github.com/astral-sh/uv) | uses-with |
patch | `0.11.3` → `0.11.6` |

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

###
[`v0.11.6`](https://redirect.github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0116)

[Compare
Source](https://redirect.github.com/astral-sh/uv/compare/0.11.5...0.11.6)

Released on 2026-04-09.

##### Bug fixes

- Do not remove files outside the venv on uninstall
([#&#8203;18942](https://redirect.github.com/astral-sh/uv/pull/18942))
- Validate and heal wheel `RECORD` during installation
([#&#8203;18943](https://redirect.github.com/astral-sh/uv/pull/18943))
- Avoid `uv cache clean` errors due to Win32 path normalization
([#&#8203;18856](https://redirect.github.com/astral-sh/uv/pull/18856))

###
[`v0.11.5`](https://redirect.github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0115)

[Compare
Source](https://redirect.github.com/astral-sh/uv/compare/0.11.4...0.11.5)

Released on 2026-04-08.

##### Python

- Add CPython 3.13.13, 3.14.4, and 3.15.0a8
([#&#8203;18908](https://redirect.github.com/astral-sh/uv/pull/18908))

##### Enhancements

- Fix `build_system.requires` error message
([#&#8203;18911](https://redirect.github.com/astral-sh/uv/pull/18911))
- Remove trailing path separators in path normalization
([#&#8203;18915](https://redirect.github.com/astral-sh/uv/pull/18915))
- Improve error messages for unsupported or invalid TLS certificates
([#&#8203;18924](https://redirect.github.com/astral-sh/uv/pull/18924))

##### Preview features

- Add `exclude-newer` to `[[tool.uv.index]]`
([#&#8203;18839](https://redirect.github.com/astral-sh/uv/pull/18839))
- `uv audit`: add context/warnings for ignored vulnerabilities
([#&#8203;18905](https://redirect.github.com/astral-sh/uv/pull/18905))

##### Bug fixes

- Normalize persisted fork markers before lock equality checks
([#&#8203;18612](https://redirect.github.com/astral-sh/uv/pull/18612))
- Clear junction properly when uninstalling Python versions on Windows
([#&#8203;18815](https://redirect.github.com/astral-sh/uv/pull/18815))
- Report error cleanly instead of panicking on TLS certificate error
([#&#8203;18904](https://redirect.github.com/astral-sh/uv/pull/18904))

##### Documentation

- Remove the legacy `PIP_COMPATIBILITY.md` redirect file
([#&#8203;18928](https://redirect.github.com/astral-sh/uv/pull/18928))
- Fix `uv init example-bare --bare` examples
([#&#8203;18822](https://redirect.github.com/astral-sh/uv/pull/18822),
[#&#8203;18925](https://redirect.github.com/astral-sh/uv/pull/18925))

###
[`v0.11.4`](https://redirect.github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0114)

[Compare
Source](https://redirect.github.com/astral-sh/uv/compare/0.11.3...0.11.4)

Released on 2026-04-07.

##### Python

- Add CPython 3.13.13, 3.14.4, and 3.15.0a8
([#&#8203;18908](https://redirect.github.com/astral-sh/uv/pull/18908))

##### Enhancements

- Add support for `--upgrade-group`
([#&#8203;18266](https://redirect.github.com/astral-sh/uv/pull/18266))
- Merge repeated archive URL hashes by version ID
([#&#8203;18841](https://redirect.github.com/astral-sh/uv/pull/18841))
- Require all direct URL hash algorithms to match
([#&#8203;18842](https://redirect.github.com/astral-sh/uv/pull/18842))

##### Bug fixes

- Avoid panics in environment finding via cycle detection
([#&#8203;18828](https://redirect.github.com/astral-sh/uv/pull/18828))
- Enforce direct URL hashes for `pyproject.toml` dependencies
([#&#8203;18786](https://redirect.github.com/astral-sh/uv/pull/18786))
- Error on `--locked` and `--frozen` when script lockfile is missing
([#&#8203;18832](https://redirect.github.com/astral-sh/uv/pull/18832))
- Fix `uv export` extra resolution for workspace member and conflicting
extras
([#&#8203;18888](https://redirect.github.com/astral-sh/uv/pull/18888))
- Include conflicts defined in virtual workspace root
([#&#8203;18886](https://redirect.github.com/astral-sh/uv/pull/18886))
- Recompute relative `exclude-newer` values during `uv tree --outdated`
([#&#8203;18899](https://redirect.github.com/astral-sh/uv/pull/18899))
- Respect `--exclude-newer` in `uv tool list --outdated`
([#&#8203;18861](https://redirect.github.com/astral-sh/uv/pull/18861))
- Sort by comparator to break specifier ties
([#&#8203;18850](https://redirect.github.com/astral-sh/uv/pull/18850))
- Store relative timestamps in tool receipts
([#&#8203;18901](https://redirect.github.com/astral-sh/uv/pull/18901))
- Track newly-activated extras when determining conflicts
([#&#8203;18852](https://redirect.github.com/astral-sh/uv/pull/18852))
- Patch `Cargo.lock` in `uv-build` source distributions
([#&#8203;18831](https://redirect.github.com/astral-sh/uv/pull/18831))

##### Documentation

- Clarify that `--exclude-newer` compares artifact upload times
([#&#8203;18830](https://redirect.github.com/astral-sh/uv/pull/18830))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTAuMiIsInVwZGF0ZWRJblZlciI6IjQzLjExMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJidWlsZDpza2lwLWRvY2tlciIsImJ1aWxkOnNraXAtcmVsZWFzZSIsImludGVybmFsIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 09:27:13 +02:00
renovate[bot] d6bc32abaf Update Rust crate hyper to v1.9.0 (#18988)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [hyper](https://hyper.rs)
([source](https://redirect.github.com/hyperium/hyper)) |
workspace.dependencies | minor | `1.8.1` → `1.9.0` |

---

### Release Notes

<details>
<summary>hyperium/hyper (hyper)</summary>

###
[`v1.9.0`](https://redirect.github.com/hyperium/hyper/blob/HEAD/CHANGELOG.md#v190-2026-03-31)

[Compare
Source](https://redirect.github.com/hyperium/hyper/compare/v1.8.1...v1.9.0)

##### Bug Fixes

- **ffi:** validate null pointers before dereferencing in
request/response functions
([#&#8203;4038](https://redirect.github.com/hyperium/hyper/issues/4038)
([28e73ccd](https://redirect.github.com/hyperium/hyper/commit/28e73ccd230cff8d7e5b5880ce2ab5fb8ced36be))
- **http1:**
- allow keep-alive for chunked requests with trailers
([#&#8203;4043](https://redirect.github.com/hyperium/hyper/issues/4043))
([7211ec25](https://redirect.github.com/hyperium/hyper/commit/7211ec25eff2ea6ee783817fee2a221d4eb2ed03),
closes
[#&#8203;4044](https://redirect.github.com/hyperium/hyper/issues/4044))
- use case-insensitive matching for trailer fields
([#&#8203;4011](https://redirect.github.com/hyperium/hyper/issues/4011))
([3b344cac](https://redirect.github.com/hyperium/hyper/commit/3b344cac9f96a9365409086dde51d06aa797ffc3),
closes
[#&#8203;4010](https://redirect.github.com/hyperium/hyper/issues/4010))
- use httparse config for Servers
([#&#8203;4002](https://redirect.github.com/hyperium/hyper/issues/4002))
([bcb8ec57](https://redirect.github.com/hyperium/hyper/commit/bcb8ec576619650d3388604e6c246829e7be133a),
closes
[#&#8203;3923](https://redirect.github.com/hyperium/hyper/issues/3923))
- **http2:**
- cancel sending client request body on response future drop
([#&#8203;4042](https://redirect.github.com/hyperium/hyper/issues/4042))
([5b17a69e](https://redirect.github.com/hyperium/hyper/commit/5b17a69ebcf969471c1a19b25ed2cb81299d1be6),
closes
[#&#8203;4040](https://redirect.github.com/hyperium/hyper/issues/4040))
- non-utf8 char in Connection header may cause panic when calling
to\_str
([#&#8203;4019](https://redirect.github.com/hyperium/hyper/issues/4019))
([c36ca8a5](https://redirect.github.com/hyperium/hyper/commit/c36ca8a5c50e4a05a78aa3e158f13456ee674fb1))

##### Features

- **client:**
- expose HTTP/2 current max stream count
([#&#8203;4026](https://redirect.github.com/hyperium/hyper/issues/4026))
([d51cb715](https://redirect.github.com/hyperium/hyper/commit/d51cb71569bbca7927b3828ef11e3bec4fa97eb4))
- add HTTP/2 `max_local_error_reset_streams` option
([#&#8203;4021](https://redirect.github.com/hyperium/hyper/issues/4021))
([57787459](https://redirect.github.com/hyperium/hyper/commit/577874591cae246dfb2d72d7140d794ac2fa605a))
- **error:** add 'Error::is\_parse\_version\_h2' method
([393c77c7](https://redirect.github.com/hyperium/hyper/commit/393c77c71138ff6e33d7089deac770a3f3f1436b))
- **http1:** add UpgradeableConnection::into\_parts
([e21205cf](https://redirect.github.com/hyperium/hyper/commit/e21205cfe4066edbcddc56150d963dabbc7d3ec4))

##### v1.8.1 (2025-11-13)

##### Bug Fixes

- **http1:** fix consuming extra CPU from previous change
([#&#8203;3977](https://redirect.github.com/hyperium/hyper/issues/3977))
([4492f31e](https://redirect.github.com/hyperium/hyper/commit/4492f31e9429c34166da5a069c00b65be20e4a02))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTAuMiIsInVwZGF0ZWRJblZlciI6IjQzLjExMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJidWlsZDpza2lwLWRvY2tlciIsImJ1aWxkOnNraXAtcmVsZWFzZSIsImludGVybmFsIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 09:26:04 +02:00
Charlie Marsh d32d51bc2f Emit JSON report for uv sync --check failures (#18976)
## Summary

Closes https://github.com/astral-sh/uv/issues/18744.
2026-04-12 13:18:51 +00:00
William Woodruff a29381347c Fix two bugs in uv audit (#18970)
## Summary

This fixes two (unrelated) bugs in `uv audit`:

1. We now correctly handle `--script` in general, including producing an
appropriate error message when the user requests `uv audit --script ...
--frozen` without a lockfile being present. Doing this required adapting
`MissingLockfile` slightly to ensure we can return an appropriate
lockfile name rather than just the generic `uv.lock`.
2. We now correctly collect extras on requirements/dep groups when
performing the `packages_for_audit` BFS. This was an oversight in my
original traversal.

## Test Plan

Added integration tests for both of these.

---------

Signed-off-by: William Woodruff <william@astral.sh>
2026-04-12 06:58:31 -04:00
konsti 8ae8cc3c92 De-quote workspace metadata linehaul data (#18966)
`workspace metadata` was the only subcommand with quotes in the linehaul
data, splitting this into an array as we do for `uv pip <…>` subcommands
should fix this.
2026-04-10 09:43:55 -04:00
Zanie Blue 9aee91cf00 Fix stale Python upgrade preview feature check in project environment construction (#18961)
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-09 21:03:48 -05:00
Zanie Blue 6abdc01e80 Filter and warn on invalid certificates (#18951)
Closes https://github.com/astral-sh/uv/issues/18890

Resolves the unexpected regression in 0.11 where `rustls-native-certs`
was previously performing filtering and switching to populating
certificates in reqwest ourselves resulted in stricter validation.

Follows https://github.com/astral-sh/uv/pull/18924 which added
pre-validation of certificates with better error messages. We retain
some of the error infrastructure for formatting a warning, but no longer
propagate it upward. We emit a log instead of a noisy user-facing
warning because they are often powerless to fix this and it's only
consequential if they attempt to communicate with a service that
requires the certificate (at which point, we'd just fail anyway).

Ideally, there's an upstream resolution in
https://github.com/rustls/webpki/issues/464 as we're still reading and
validating all of these certificates more than once.
2026-04-09 17:02:01 -05:00
Zanie Blue 40c96d7266 Expand certificate validation error message improvements (#18933)
Follows https://github.com/astral-sh/uv/pull/18924
2026-04-09 19:54:37 +00:00
William Woodruff f138c6c9e8 Enable filtering OSV results for malware (#18934)
## Summary

This is towards #18781 -- we now have a small `Filter` type, and we can
filter an OSV query to limit it to just malware results by passing
`Filter::Malware`. This has no performance cost versus normal queries
since with OSV's "batch query" API we can cheaply pre-filter IDs before
actually fetching the full OSV payloads.

## Test Plan

Added a unit test that exhibits the filtering.

---------

Signed-off-by: William Woodruff <william@astral.sh>
2026-04-09 17:40:41 +00:00
Zanie Blue 9581f2b0ea Add GHSA-pjjw-68hj-v9mw to the changelog (#18950) 2026-04-09 13:48:11 +00:00
konsti 65950801cc Bump version to 0.11.6 (#18948) 0.11.6 2026-04-09 11:21:12 +00:00
konsti 7983c7a5be Validate and heal RECORD during installation (#18943)
Check the RECORD of a wheel file and heal it if necessary, to ensure the
RECORD and the wheel contents always match, and uninstallation can't
remove files that don't belong to the wheel. This check and repair
happen between unpacking a wheel and persisting it in the cache,
ensuring that every wheel that ends up in the cache has a valid RECORD.

We collect the paths from the archive in the unpacking step, I added it
in all unpacking steps for consistency. I also improved the consistency
around RECORD handling code.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-04-09 13:07:50 +02:00
samypr100 b38439bfc7 Avoid uv cache clean errors due to Win32 path normalization (#18856)
## Summary

Closes #16586

Adds a public function to `uv-fs` crate called `verbatim_path` which is
now leveraged by `rm_rf` in `uv-cache` crate for cleaning paths that
require verbatim composition to avoid failures seen in #16586.

## Test Plan

Tested locally on Windows 10 and 11 by setting `UV_CACHE_DIR` to a local
directory and then running `uv init`, `uv add uwsgi`, and `uv cache
clean` to ensure there is no failures.

Additionally unit and integration tests were added to avoid future
regressions.
2026-04-09 12:55:34 +02:00
konsti a0e461ac44 Do not remove files outside the venv on uninstall (#18942)
Check that only files inside the installation scheme can be removed when
uv uninstalls a package. This fixes a bug where uv would try to remove
arbitrary files due to a malformed or malicious RECORD file in a wheel.
For venvs, the installation prefix is the entire venv, as `.data/data`
allows wheels to write to the entire venv, so all files in the venv can
also be removed.

This is both a correctness fix (uv should never remove files outside its
domain) and a low severity security fix, where a malicious wheel could
remove a user's files during uninstallation, such as a `uv sync` that
upgrades the package version. Note that this requires an attacker having
control over the wheel, which also allows them to modify arbitrary
Python code. There are no known cases of wheels actually referencing
files outside the installation scheme in their RECORD.
2026-04-09 10:18:26 +00:00
Zanie Blue 95eaa68c8d Bump version to 0.11.5 (#18930) 0.11.5 2026-04-08 15:01:32 -05:00
Zanie Blue f6d67d57c1 Improve certificate loading error messages (#18924)
See https://github.com/astral-sh/uv/issues/18890

Adds special-case validation for `SSL_CERT_FILE` and `SSL_CERT_DIR`
where we actually check if webpki will accept the given certificates
and, if not, emit a better error message about why. This means we
perform eager validation of certificates, parsing them more than once
since reqwest will parse them again on client build. Unfortunately,
there's not a straight-forward way to provide our pre-parsed
certificates to reqwest without doing a lot more work. Nor is there a
clear way to retrieve the parsed certificates on error.

We use https://github.com/rusticata/x509-parser for parsing which seems
reputable.

We may want to _drop_ all invalid certificates instead, but that can be
a future decision and this machinery can be reused for warnings.

Ideally webpki would just have better error messages, but that's a
separate project.
2026-04-08 14:16:25 -05:00
Charlie Marsh 39b83c30e0 Add exclude-newer to [[tool.uv.index]] (#18839)
## Summary

This PR enables users to set an `exclude-newer` override on a per-index
basis.

The priority is such that global `exclude-newer-package` has highest
priority, followed by `exclude-newer` on an index, followed by global
`exclude-newer`.

Closes https://github.com/astral-sh/uv/issues/16813.
2026-04-08 18:52:40 +00:00
William Woodruff 7924ba5b14 uv audit: add context/warnings for ignored vulnerabilities (#18905)
## Summary

This makes one small QoL change to `uv audit`:

- We now warn the user if they ignore (via CLI or config) a
vulnerability ID, but that ID doesn't actually match any known
vulnerabilities discovered during the audit. This can happen due to
drift (e.g. the user upgrades but forgets to removed a stale ID) or user
error (the user typos a vulnerability ID).
~~- We now report the number of ignored vulnerabilities as a statistic
in the output. In practice, this means users will see something like "5
vulnerabilities (2 ignored)" in the header of `uv audit`'s output if
they ignore vulnerabilities.~~

See #18506.

## Test Plan

Added integration tests for the new behavior.

---------

Signed-off-by: William Woodruff <william@astral.sh>
2026-04-08 14:29:01 -04:00
Zanie Blue a352ce01ea Remove the legacy PIP_COMPATIBILITY.md redirect file (#18928)
It has been 2 years, we probably do not need this around anymore
2026-04-08 13:25:59 -05:00
Charlie Marsh 33b6338911 Normalize persisted fork markers before lock equality checks (#18612)
## Summary

This PR attempts to apply the same canonicalization we apply at
serialization time, but in-memory when constructing the `Lock`, to
further avoid mismatches between the deserialized and in-memory
representations.

Closes https://github.com/astral-sh/uv/issues/18553.
2026-04-08 13:17:03 -05:00
William Woodruff 6a203d9c1d Clear junction properly when uninstalling Python versions on Windows (#18815)
## Summary

Reproduces and fixes #18793.

Previously, when uninstalling Python versions on Windows, we'd remove
junctions (i.e. soft links) for the minor version _after_ deleting the
installation itself. This worked correctly on Linux and macOS but _not_
on Windows, since on Windows we'd call `junction::get_target` (via
`PythonMinorVersionLink::exists`), which would fail because the junction
would be dangling following the deletion. Specifically, `read_target`
returns `None`, short circuiting the `target_directory` check.

The fix here is to reorder the uninstallation flow so that we precompute
and remove the links _before_ the underlying installations are deleted.
I've added two tests that both reproduced the behavior and now
demonstrate the fix working.

Note:
https://github.com/astral-sh/uv/pull/18815/changes/81c27ba0e1f225189949ddb60bc11e6902e55dd0
shows a smaller alternative fix -- instead of reordering the
installation flow, we can change the "entry exists" logic on Windows to
not require that the target still exists. I believe this would also be
functionally correct, but I think reordering the uninstallation flow
makes more sense (in terms of eliminating the surprising state rather
than trying to work around it).

## Test Plan

Look at me, I am the test plan now.

---------

Signed-off-by: William Woodruff <william@astral.sh>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-04-08 14:13:28 -04:00
Zanie Blue 6af38bb1be Update bare suffix in subsequent--bare init documentation as well (#18925) 2026-04-08 17:00:21 +00:00
rm76 5aca743f0e uv init example-bare --bare (#18822)
A small typo:
uv init example --bare --> uv init example-bare --bare

<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

<!-- How was it tested? -->
2026-04-08 18:29:20 +02:00
Zanie Blue 6a3331fe10 Create a "deployment" for the release-gate job (#18920)
We now enforce that a successful deployment was created to prevent a
malicious actor from making this job pass without going through the
release-gate environment
2026-04-08 14:41:58 +00:00
Zanie Blue 7b563a0f5a Report error cleanly instead of panicking on TLS certificate error (#18904)
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.
2026-04-08 09:19:27 -05:00
konsti fb1467bb5a Remove trailing path separators in path normalization (#18915)
In `normalize_path`, also remove trailing (back)slashes. Rust ignores
trailing slashes in many operations, such as iterating components and
notably equality (`Path::new("foo/") == Path::new("foo")`), but it does
break workspace discovery and caching if not normalized.

The implementation is inelegant as Rust exposes no way to access the
last char of a path properly, so we look at the last byte instead.
2026-04-08 09:19:14 -05:00
Zanie Blue 6eb5fe09cc Remove doctests from uv-keyring (#18919)
Closes https://github.com/astral-sh/uv/issues/18916

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-08 09:11:58 -05:00
github-actions[bot] 84a854c169 Sync latest Python releases (#18917)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2026-04-08 12:47:57 +00:00
David Peter 466a0f0df2 Fix build_system.requires error message (#18911)
## Summary

Fixes a minor formatting problem in an error message.

I wasn't able to reproduce the warning in `uv run` on the lastest
version for some reason, which is why I don't have an "after" screenshot
for `uv run`. The "before" screenshot is from uv 0.11.3.

**Before:**

<img width="1042" height="115" alt="image"
src="https://github.com/user-attachments/assets/4a81aded-44e1-4bac-85dc-acc1effd67fd"
/>

<img width="917" height="119" alt="image"
src="https://github.com/user-attachments/assets/600fa58c-78e8-4b4e-a91f-1bc60546b39e"
/>

**After:**

<img width="1007" height="104" alt="image"
src="https://github.com/user-attachments/assets/42f8b715-ab19-4049-8f2d-2c649b8677e0"
/>

## Test Plan

Only tested interactively, see above.
2026-04-08 10:52:14 +02:00
Zanie Blue 3523c23490 Bump version to 0.11.4 (#18909) 0.11.4 2026-04-07 21:25:19 -04:00
github-actions[bot] 5bb0dc3e90 Sync latest Python releases (#18908)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2026-04-08 00:51:47 +00:00
Charlie Marsh 01893f1e59 Tell agents to use snapshots (#18903)
Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-04-07 19:13:49 +00:00
Charlie Marsh 821ffeb015 Enforce direct URL hashes for pyproject.toml dependencies (#18786)
## Summary

These requirements are technically "transitive", so we miss them in our
initial pass. As such, we need to collect them while we lookahead.

Closes https://github.com/astral-sh/uv/issues/18778.
2026-04-07 19:01:00 +00:00
Charlie Marsh 53416c5855 Store normalized repository URL on GitUrl (#18843)
## Summary

Gets rid of a TODO from a prior PR. What we previously called
`repository` is now `url`, and `repository` refers to the
`RepositoryUrl`.
2026-04-07 18:54:42 +00:00
Charlie Marsh bfb4d2804d Convert Clippy allows to expects (#18906) 2026-04-07 13:47:08 -05:00
Charlie Marsh d22a54b137 Require all direct URL hash algorithms to match (#18842)
## Summary

If we're given multiple hashes for a direct URL dependency, we now
validate _all_ of them rather than accepting any _one_ correct match.
2026-04-07 18:40:18 +00:00
Charlie Marsh af44d0a155 Merge repeated archive URL hashes by version ID (#18841)
## Summary

If we encounter multiple hashes for the same direct URL, we now (1)
reject if they use the same algorithm but different values, and (2)
collect if they use different algorithms. This includes cases in which a
user provides _both_ a hash in the fragment _and_ via `--hash`.

For now, if _any_ hash is correct, the URL will be accepted; we'll
change this in the future. (On main, we only consider the last-seen hash
anyway.)
2026-04-07 17:54:55 +00:00
Charlie Marsh b536446bef Move and rename exclude-newer override type (#18838)
## Summary

We want to reuse this in `[[tool.uv.index]]` definitions, so it both (1)
needs to be more generic (rather than `ExcludeNewerPackage`) and (2)
needs to be accessible to more crates (so it's now in
`uv-distribution-types`).
2026-04-07 11:54:11 -05:00
Zanie Blue f40124f1ee Patch Cargo.lock in uv-build source distributions (#18831)
Closes #18824 

This is a little janky but not ridiculous while we work on upstreaming a
proper fix. It seems like they can't just invoke `cargo` so I think it's
quite involved.

See also https://github.com/PyO3/maturin/issues/2609

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-07 11:50:34 -05:00
Charlie Marsh c5977cc4ae Use structured source data for version IDs (#18840)
## Summary

Right now, two direct URLs with different hash fragments are considered
different versions based on `VersionId`. This PR changes the internal
representation to match our parsed URL structure. E.g., these should be
considered the same "version" if specified as direct URLs:

```text
https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl#sha256=cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f

https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl#sha512=f30761c1e8725b49c498273b90dba4b05c0fd157811994c806183062cb6647e773364ce45f0e1ff0b10e32fe6d0232ea5ad39476ccf37109d6b49603a09c11c2
```
2026-04-07 12:07:29 -04:00
Zanie Blue 5108919f03 Add support for --upgrade-group (#18266)
Closes https://github.com/astral-sh/uv/issues/13705

Note this only affects top-level group members, not transitive
dependencies of them.
2026-04-07 11:05:38 -05:00
Charlie Marsh 191e5f5bf4 Store relative timestamps in tool receipts (#18901)
## Summary

Tool receipts were only storing the absolute timestamp, not the relative
span. So upgrades, `--outdated`, etc., were operating off the fixed
cutoff. We now follow the approach used in the lockfile, whereby we
store the cutoff and the relative span, and use that to recompute
offsets.
2026-04-07 10:32:04 -05:00
Charlie Marsh 27dc5627d0 Add AGENTS.md (#18902)
## Summary

Like Ruff, we now use `AGENTS.md` and tell Claude to look at that for
any Claude users.
2026-04-07 10:44:14 -04:00
Charlie Marsh bca76afb9c Respect --exclude-newer in uv tool list --outdated (#18861)
## Summary

Closes https://github.com/astral-sh/uv/issues/18819.
2026-04-07 09:44:27 -04:00
Zanie Blue 2cf99b91ec Recompute relative exclude-newer values during uv tree --outdated (#18899)
See https://github.com/astral-sh/uv/issues/18708#issuecomment-4129893195

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-07 08:34:17 -05:00