Commit Graph

6388 Commits

Author SHA1 Message Date
renovate[bot]
0f58828003 Update Swatinem/rust-cache action to v2.7.8 (#13160) 2025-04-27 22:30:40 -04:00
renovate[bot]
602d29a622 Update Rust crate miette to v7.6.0 (#13154) 2025-04-28 02:30:22 +00:00
renovate[bot]
2284985381 Update Rust crate indexmap to v2.9.0 (#13152) 2025-04-28 02:26:36 +00:00
renovate[bot]
9c8f13d102 Update Rust crate insta to v1.43.0 (#13153) 2025-04-28 02:26:15 +00:00
renovate[bot]
7aa2b82673 Update Rust crate smallvec to v1.15.0 (#13157) 2025-04-27 22:25:57 -04:00
renovate[bot]
8727b01c37 Update Rust crate petgraph to 0.8.0 (#13156) 2025-04-27 22:25:47 -04:00
renovate[bot]
7770ac60db Update Rust crate once_cell to v1.21.3 (#13155) 2025-04-27 22:25:39 -04:00
renovate[bot]
0a49849f5a Update docker/build-push-action action to v6.16.0 (#13151) 2025-04-28 02:23:30 +00:00
renovate[bot]
5783ed666e Update actions/setup-python action to v5.6.0 (#13150) 2025-04-27 21:38:50 -04:00
renovate[bot]
edbc6e9235 Update Rust crate toml to v0.8.21 (#13148) 2025-04-27 21:29:39 -04:00
ndrew222
6171f0aea8 [docs] Changed fish completions append >> to overwrite > (#13130) 2025-04-27 20:52:14 -04:00
renovate[bot]
2c5e95c6bc Update Rust crate tokio-util to v0.7.15 (#13147) 2025-04-27 20:37:38 -04:00
renovate[bot]
17cfd82c34 Update taiki-e/install-action digest to ab3728c (#13143) 2025-04-28 00:32:30 +00:00
renovate[bot]
bb16905a69 Update pypa/gh-action-pypi-publish digest to db8f07d (#13142) 2025-04-27 20:31:18 -04:00
renovate[bot]
eb7590393f Update Rust crate syn to v2.0.101 (#13146) 2025-04-27 20:30:52 -04:00
renovate[bot]
5f6c5237b4 Update Rust crate jiff to v0.2.10 (#13145) 2025-04-27 20:28:55 -04:00
renovate[bot]
42211df3d0 Update pre-commit hook astral-sh/ruff-pre-commit to v0.11.7 (#13144) 2025-04-27 20:27:47 -04:00
Charlie Marsh
38bcf66861 Don't run CodSpeed benchmarks outside of astral-sh/uv (#13140)
## Summary

This fails on forks, I think, since you can't post to CodSpeed.
2025-04-27 20:22:31 -04:00
Charlie Marsh
dc5b3762f3 Show tag hints when failing to find a compatible wheel in pylock.toml (#13136)
## Summary

Closes #13135.
2025-04-27 12:56:50 -04:00
Charlie Marsh
78756de027 Respect build options (--no-binary et al) in pylock.toml (#13134)
## Summary

Closes #13133.
2025-04-27 12:28:30 -04:00
Charlie Marsh
17b4ebed8e Avoid erroring on omitted wheel-only packages in pylock.toml (#13132)
## Summary

Closes https://github.com/astral-sh/uv/issues/13127.
2025-04-27 11:58:20 -04:00
Charlie Marsh
1cafcd0ad9 Loosen github.repository match in ci.yml (#13121)
## Summary

Discussed with @zanieb and was recommended to remove this piece
entirely.
2025-04-26 16:16:58 +00:00
ReinforcedKnowledge
1b23035703 Add pylock.toml mentions where relevant (#13115)
Just a small PR to add mentions to `pylock.toml` in the CLI manual where
appropriate.

I tried to say "PEP-751 compatible lock files" when appropriate to also
include the case `r"^pylock\.([^.]+)\.toml$"`. Feel free to change that
if you think it's cluttery.

I also tried to include the "single-use" wording when it made sense.

I also have almost never used the `uv pip` interface, so maybe there are
some other minor things to add here and there about the usage of
`pylock.toml` that I missed.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-04-26 14:26:30 +00:00
Zanie Blue
fb08116800 Report Python versions in pyvenv.cfg version mismatch (#13027)
When working on #13025 I noticed this message was lacking versions,
which seems frustrating if you're debugging things.

I refactored the general `matches_interpreter` utilities that were added
in https://github.com/astral-sh/uv/pull/12884 into a more purpose-fit
function that returns an `Option` with the versions if there's a
mismatch.
2025-04-25 18:06:46 +00:00
Charlie Marsh
8414e9f3dd Bump version to v0.6.17 (#13110) 0.6.17 2025-04-25 12:57:07 -05:00
konsti
c7c9b7a90e Test publishing with pypa/gh-action-pypi-publish (#12742)
A publish testing for #11652
2025-04-25 18:27:40 +02:00
konsti
09129031a4 Fix panic with invalid last char in PEP 508 name (#13105)
Fixes #13102
2025-04-25 14:56:46 +02:00
konsti
ae5c77c0e4 Reject requires python even if not listed on the index page (#13086)
Reject distributions with an incompatible `Requires-Python`, even if the
index page is missing `data-requires-python`.

Fixes #13079
2025-04-25 12:52:02 +02:00
konsti
cd7621043e Block scripts from overwriting python (#13051)
uv adds some binaries and scripts to a venv, and installed packages
should not be allowed to overwrite them.

Fixes #12983
2025-04-25 07:10:10 +00:00
John Mumm
9fb19cd43c Check for mismatched package and distribution names on resolver thread (#13088)
This PR restores the `bogus_redirect` test that was
non-deterministically hanging (reverting #13076).

Mismatched package and distribution names were causing uv to hang prior
to #12917 (which added the `bogus_redirect` test). But with that fix, uv
was only checking for mismatched package names on the main thread (and
not the resolver thread). This allowed for a race condition which would
prevent uv from ever doing the check, triggering the original hang
condition. This PR adds the check to the resolver thread to prevent this
race condition.
2025-04-24 15:18:01 +02:00
konsti
43e5a6ef96 Update pubgrub to a3b4db3 (#13066)
Maintenance update to PubGrub a3b4db3abb1829ce889fb89fa6d157fef529ef7e
2025-04-24 10:39:57 +00:00
Charlie Marsh
a4ea814159 Avoid panic for invalid Python versions (#13077)
## Summary

We unwrap these further on, so we should validate them ahead of time.

Closes https://github.com/astral-sh/uv/issues/13075.
2025-04-23 22:23:33 +00:00
Charlie Marsh
a6a0087f74 Temporarily remove bogus redirect test (#13076)
## Summary

This needs to be made more reliable.
2025-04-23 17:18:31 -04:00
Charlie Marsh
4bef9fadbb Add PyTorch v2.7.0 to GPU backend (#13072)
## Summary

The first version to support CUDA 12.8.
2025-04-23 16:59:41 -04:00
konsti
473d7c75a4 Check dist name to handle bogus redirect (#12917)
When an index performs a bogus redirect or otherwise returns a different
distribution name than expected, uv currently hangs.

In the example case, requesting the simple index page for any package
returns the page for anyio. This mean querying the sniffio version map
returns only anyio entries, and the version maps resolves to an anyio
version. When the resolver makes a query for sniffio and waits for it to
resolve, the main thread finds an anyio and resolves only that in the
wait map, causing the hang.

We fix this by checking the name of the returned distribution against
the name of the requested distribution. For good measure, we add the
same check in `Request::Dist` and `Request::Installed`. For performance
and complexity reasons, we don't perform this check in the version map
itself, but only after a candidate distribution has been selected.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-04-22 15:36:27 +00:00
Ben Beasley
45910eb6d1 Fix several occurrences of the phrase “This options” (#13053)
## Summary

Fixes several occurrences of the minor typo “This options” for “This
option.”
<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

<!-- How was it tested? -->
Since this is just a typo fix in documentation and comment strings, no
particular testing was conducted.

## Notes

The typo fixes in `crates/uv-cli/src/lib.rs` would affect
`docs/reference/cli.md`. I assumed you might want to just re-generate
the reference documention, but fixing it up manually would look like:

```diff
diff --git a/docs/reference/cli.md b/docs/reference/cli.md
index 338fa0ff9..8851ca2c0 100644
--- a/docs/reference/cli.md
+++ b/docs/reference/cli.md
@@ -355,7 +355,7 @@ uv run [OPTIONS] [COMMAND]
 
 </dd><dt id="uv-run--no-group"><a href="#uv-run--no-group"><code>--no-group</code></a> <i>no-group</i></dt><dd><p>Disable the specified dependency group.</p>
 
-<p>This options always takes precedence over default groups, <code>--all-groups</code>, and <code>--group</code>.</p>
+<p>This option always takes precedence over default groups, <code>--all-groups</code>, and <code>--group</code>.</p>
 
 <p>May be provided multiple times.</p>
 
@@ -1757,7 +1757,7 @@ uv sync [OPTIONS]
 
 </dd><dt id="uv-sync--no-group"><a href="#uv-sync--no-group"><code>--no-group</code></a> <i>no-group</i></dt><dd><p>Disable the specified dependency group.</p>
 
-<p>This options always takes precedence over default groups, <code>--all-groups</code>, and <code>--group</code>.</p>
+<p>This option always takes precedence over default groups, <code>--all-groups</code>, and <code>--group</code>.</p>
 
 <p>May be provided multiple times.</p>
 
@@ -2492,7 +2492,7 @@ uv export [OPTIONS]
 
 </dd><dt id="uv-export--no-group"><a href="#uv-export--no-group"><code>--no-group</code></a> <i>no-group</i></dt><dd><p>Disable the specified dependency group.</p>
 
-<p>This options always takes precedence over default groups, <code>--all-groups</code>, and <code>--group</code>.</p>
+<p>This option always takes precedence over default groups, <code>--all-groups</code>, and <code>--group</code>.</p>
 
 <p>May be provided multiple times.</p>
 
@@ -2855,7 +2855,7 @@ uv tree [OPTIONS]
 
 </dd><dt id="uv-tree--no-group"><a href="#uv-tree--no-group"><code>--no-group</code></a> <i>no-group</i></dt><dd><p>Disable the specified dependency group.</p>
 
-<p>This options always takes precedence over default groups, <code>--all-groups</code>, and <code>--group</code>.</p>
+<p>This option always takes precedence over default groups, <code>--all-groups</code>, and <code>--group</code>.</p>
 
 <p>May be provided multiple times.</p>
 
```
2025-04-22 09:20:00 -04:00
Michał Górny
41727cbc54 Support using uv build-backend in the Python backend (#13049)
<!--
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

Provide an in-code switch to permit using the `uv build-backend` command
rather than the default `uv-build` in the Python PEP517 backend. This
option is intended to be used by downstream packagers to provide an
option of reusing `uv` that was built already instead of having to build
a second `uv-build` executable that largely overlaps with `uv`.

Fixes #12389

## Test Plan

The option is intended for downstream consumption only, and it is tested
downstream (via attempting to build a package using the `uv_build`
backend). The backend itself is covered by tests already.

---------

Co-authored-by: konstin <konstin@mailbox.org>
2025-04-22 13:46:42 +02:00
konsti
7807e64357 Apply context filter to PEP 751 tests (#13047)
Filter out the Python patch version from `pylock.toml` exports.

Fixes #13039
2025-04-22 08:43:24 +00:00
Ed Morley
7297b9d355 Fix typo in 0.6.15 changelog entry (#13043)
`s/not/note/`
2025-04-22 09:05:31 +02:00
Zanie Blue
d8ad9d3cd6 Bump verison to 0.6.16 (#13042)
Includes #13041 

Also reverts https://github.com/astral-sh/uv/pull/13036
0.6.16
2025-04-22 03:53:08 +00:00
Zanie Blue
534953290b Revert "Properly handle authentication for 302 redirect URLs" (#13041)
This reverts commit 17ed789edb / #12920 

There's a regression reported in
https://github.com/astral-sh/uv/issues/13037 and it looks like we're
missing some important parts per #13040
2025-04-22 03:40:42 +00:00
Zanie Blue
66a44cc6e0 Add crates/uv-publish/src/lib.rs to version patch files (#13036)
See
https://github.com/astral-sh/uv/actions/runs/14583501775/job/40904734786?pr=13034

cc @jtfmumm I'm not sure why this changed in
https://github.com/astral-sh/uv/pull/12920 but please be careful of
snapshots with the uv version. We might want to filter that out.

cc @konstin regarding if there are less brittle ways snapshot here.
2025-04-22 01:45:16 +00:00
Zanie Blue
e2f400adbe Bump version to 0.6.15 (#13034)
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
0.6.15
2025-04-22 00:03:33 +00:00
Charlie Marsh
12bfbed0ec Omit PEP 751 version for source trees (#13030)
## Summary

This is a "MUST NOT" in the spec.
2025-04-21 22:58:39 +00:00
Charlie Marsh
6130524585 Clean up TOML-to-Jiff conversion (#13028)
## Summary

Based on some feedback from the Jiff author (@BurntSushi).
2025-04-21 22:49:42 +00:00
Charlie Marsh
2ba4edfbbe Add PEP 751 support to uv pip compile (#13019)
## Summary

You now specify `--format pylock.toml` or `-o pylock.toml` to output in
PEP 751 format.
2025-04-21 22:48:54 +00:00
Zanie Blue
b594c2d702 Add test case for uv python list downloads (#12381)
Requires #12380 
Extends new tests from #12374 

Is waiting for dependent PRs to merge; for early review see
a27c93e3b6
2025-04-21 22:24:55 +00:00
Charlie Marsh
ffcd5eb14f Validate that PEP 751 entries don't include multiple sources (#12993)
## Summary

The spec defines these as mutually exclusive, so we now error when
trying to install such a package.
2025-04-21 22:22:03 +00:00
Zanie Blue
cda72b297f Refactor environment validity check into separate function (#13025)
Now, we can use early returns! Pulled out of
https://github.com/astral-sh/uv/pull/7934, where we're adding more logic
here.
2025-04-21 22:17:50 +00:00
Charlie Marsh
e089c42e43 Add pylock.toml to uv pip install and uv pip sync (#12992)
## Summary

We accept `pylock.toml` as a requirements file (e.g., `uv sync
pylock.toml` or `uv pip install -r pylock.toml`). When you provide a
`pylock.toml` file, we don't allow you to provide other requirements, or
constraints, etc. And you can only provide one `pylock.toml` file, not
multiple.

We might want to remove this from `uv pip install` for now, since `pip`
may end up with a different interface (whereas `uv pip sync` is already
specific to uv), and most of the arguments aren't applicable (like
`--resolution`, etc.). Regardless, it's behind `--preview` for both
commands.
2025-04-21 22:10:30 +00:00