8044 Commits

Author SHA1 Message Date
Zanie Blue
0dc9556adb Bump version to 0.9.21 (#17270) 0.9.21 2025-12-30 15:46:08 +00:00
Zanie Blue
c26a57670d Fix regression where zstd distribution hashes were not considered valid (#17265)
Fixes a regression from https://github.com/astral-sh/uv/pull/17157 as
reported in https://github.com/astral-sh/uv/issues/17260

Closes https://github.com/astral-sh/uv/issues/17260
Closes https://github.com/astral-sh/uv/pull/17263

You can see the regression test fail
[here](https://github.com/astral-sh/uv/actions/runs/20599629637/job/59162043790?pr=17269)
in #17269 which cherry-picks the commit adding tests without the fix.
2025-12-30 15:24:03 +00:00
Ed Morley
071c692790 Fix typo in 0.9.20 changelog entry (#17262)
Since it was a re-release of 0.9.19, not 0.9.20.
2025-12-30 07:57:15 -06:00
William Woodruff
53cc00eab5 Fix a small typo in the resolution docs (#17258) 2025-12-29 19:06:41 -05:00
Zanie Blue
8c429c8fb8 Fix typo in python install --default documentation (#9826)
Signed-off-by: William Woodruff <william@astral.sh>
Co-authored-by: William Woodruff <william@astral.sh>
2025-12-29 18:54:50 -05:00
renovate[bot]
edafa2c020 Update actions/checkout digest to 8e8c483 (#13905)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-29 17:14:09 -05:00
renovate[bot]
3d745d2261 Update actions/attest-build-provenance digest to 00014ed (#16556)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: William Woodruff <william@astral.sh>
2025-12-29 16:15:40 -05:00
Charlie Marsh
765a967236 Bump version to 0.9.20 (#17256)
## Summary

In #17254, I failed to bump the versions of the various internal crates,
so need to re-release.
0.9.20
2025-12-29 20:13:57 +00:00
Charlie Marsh
a45f502e3a Bump version to 0.9.19 (#17254)
Closes https://github.com/astral-sh/uv/issues/17240
2025-12-29 13:41:40 -05:00
Tomasz Kramkowski
936da00509 Improve reliability of certain managed python tests on Windows CI (#17177)
### Summary

Group IO bound (managed python related) tests and run them early and serially to avoid hitting timeouts by reducing the amount of IO contention that these tests suffer from.

The PR has a lot of cool tables which explain the benefits in more detail.
2025-12-29 13:24:50 +00:00
Tomasz Kramkowski
c19e22fb0b Use nextest profiles to configure CI (#17220)
This centralises the configuration and allows certain overrides to be CI
specific.
2025-12-29 13:13:43 +00:00
shamil777
543f1f3f59 Improve wording in Concepts/Projects/Creating projects documentation (#17242)
## Summary

Replace misplaced "will" with "to".
2025-12-28 10:53:05 +00:00
Charlie Marsh
4269f889bb Avoid flagging proxied Git URLs as ambiguous authority (#17234)
## Summary

Closes https://github.com/astral-sh/uv/issues/17214.
2025-12-25 06:42:21 -05:00
Jop Zitman
cc4600ce87 Fix dropped support of - in pip constraints/overrides/excludes/build_constraints (#17188)
Since #16923, `-` stdin paths are suddenly only supported on the
`RequirementsSource::Extensionless`. However, parsing of cli arguments
using `from_requirements_txt`, `from_constraints_txt`
`from_overrides_txt` would always output a
`RequirementsSource::RequirementsTxt`. Resulting in the error:

```
$ cat overrides.txt | cargo run --bin uv --profile dev --manifest-path ./uv/crates/uv/Cargo.toml pip install 'numpy' --overrides=-
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s
     Running `./uv/target/debug/uv pip install 'numpy' --overrides=-`
error: File not found: `-`
```

In this PR, I've added a small check in those for the `-` paths to use
`RequirementsSource::ExtensionLess`.

I'm not too sure about this change though, as it would also implicitly
start allowing PEP 723 scripts as input to overrides/constraints. I
don't see the direct issue in that, but then maybe we should explicitly
handle it so that an `--overrides=script.py` would also be supported.
@zanieb what do you think?

Relates to #17227
2025-12-24 08:47:39 -05:00
William Woodruff
7865672918 Avoid two hot String allocations in deserialization (#17221) 2025-12-22 16:38:17 -05:00
Tomasz Kramkowski
de868ed148 Allow uv pip compile to install missing python interpreters in cases where it would otherwise fail (#17216)
## Summary

Partially address #16709.

Previously, if cornered, `pip compile` would fail when the requested
python interpreter couldn't be found (more details in the issue and
comments), and now in those cases it will download it.

## Test Plan

Added an integration test for this case.
2025-12-22 16:29:50 +00:00
Arthur Pastel
137edcf239 Bump CodSpeed action to v4.4.1 (#17198)
## Summary

This fixes the report generation issues caused by large profile data now
properly handled by this newer version

## Test Plan

Reports should be generated on this PR
2025-12-20 10:28:04 -06:00
Zanie Blue
631ab22b9a Add trailing newline when writing download-metadata.json (#17194)
When we added formatting, the newline was added but it isn't written by
the generator script so https://github.com/astral-sh/uv/pull/17193
removes it.

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-19 18:56:17 -06:00
Zanie Blue
1d9672c11c Fix inconsistent path in editable-path-dep example (#17190)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-19 15:12:49 +00:00
Zanie Blue
8d691f8a4b Add a sources example to the uv pip migration guide (#17183)
Documents https://github.com/astral-sh/uv/issues/6275

---------

Co-authored-by: Tomasz Kramkowski <tom@astral.sh>
2025-12-19 14:07:39 +00:00
Zanie Blue
a0a14b17ec Support comma-separated values in --no-binary and --only-binary (#17185)
Closes #17181

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-19 07:58:35 -06:00
Zanie Blue
e006a69fe8 Configure prettier prose-wrap in .prettierrc instead of the CLI (#17184)
This also removes the file-specific targets from prettier execution
which means we're including `.json`, `.css`, and `.html` files, which
seems like an improvement.

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-18 18:54:23 -06:00
Tomasz Kramkowski
c2e1983cd6 Summarize package changes in uv sync json format output (#16981)
## Summary

Implement #16653 by making `uv sync --output-format=json` output
information about package changes.

## Test Plan

Additional tests to test the cases where there is no known package
version _may_ be beneficial but as the information used is the same as
the information used by the dry run logging now, I don't think that's
strictly necessary as those cases are tested.

---------

Co-authored-by: Liam <liam@scalzulli.com>
2025-12-18 19:37:02 +00:00
Zanie Blue
9949f0801f Respect UV_PYTHON_DOWNLOAD_MIRROR in uv python list (#16673)
Closes https://github.com/astral-sh/uv/issues/16671

Mostly authored by Claude
2025-12-18 11:29:48 -06:00
Charlie Marsh
c1d3c9bdb2 Cache NVIDIA-hosted wheels by default (#17164)
## Summary

Matches our behavior for PyTorch.

Closes https://github.com/astral-sh/uv/issues/16959.
2025-12-18 08:33:13 -05:00
github-actions[bot]
1ddb646a74 Add CPython 3.15.0a3 (#17165)
Automated update for Python releases.

---------

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-12-18 13:15:04 +00:00
Zanie Blue
994b108af2 Link to the contributing tab instead of the document (#17146)
I'm not sure if this is strictly better? but seemed worth a try


[Rendered](https://github.com/astral-sh/uv/tree/zb/contributing?tab=readme-ov-file#contributing)
2025-12-18 06:56:51 -06:00
konsti
e2a775d727 Use the same retry logic across uv (#17105)
We were using slightly different retry code in multiple places, this PR
unifies it.

Also fixes retry undercounting in publish if the retry middleware was
involved.

---------

Co-authored-by: Tomasz Kramkowski <tom@astral.sh>
2025-12-18 12:44:37 +00:00
konsti
44d1a302c8 Update retry-policies to 0.5.1 (#17170)
Fixes #17169
2025-12-18 10:59:15 +00:00
konsti
a25d4f953f Fix retry counts in cached client (#17104)
Previously, we dropped the counts from the middleware layer, potentially
doing to many retries and/or reporting too few.

Not pretty but fixes the bug.
2025-12-18 10:51:00 +00:00
stringscut
9f422e7515 Fix comment typos and improve wording (#17166)
<!--
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

improve code comments clarity

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

## Test Plan

<!-- How was it tested? -->

Signed-off-by: stringscut <stringscut@outlook.jp>
2025-12-18 11:47:43 +01:00
konsti
9360ca7778 Refactor uv retrayble strategy to use a single code path (#17099)
Refactoring that allows uv's retryable strategy to return
`Some(Retryable::Fatal)`, also helpful for
https://github.com/astral-sh/uv/pull/16245
2025-12-18 11:10:47 +01:00
Charlie Marsh
6fa8204efe Avoid enforcing incorrect hash in mixed-hash settings (#17157)
## Summary

Right now, when we return a `Dist` from a lockfile, we concatenate all
hashes for all distributions for a given package. In the case of
https://github.com/astral-sh/uv/issues/17143, I think that means we'll
return the SHA256 from the sdist, plus the SHA512 from the wheel. If the
wheel was previously installed (i.e., it's in the cache), and we
computed the SHA256 at that point in time, then `Hashed::has_digests`
would return `true` because we have _at least_ one SHA256. We now limit
the hashes to the distribution that we expect to install.

Closes https://github.com/astral-sh/uv/issues/17143.
2025-12-17 16:01:59 +00:00
Charlie Marsh
6578e0521b Avoid creating file contents with uv init --bare --script (#17162)
## Summary

As suggested in Discord.
2025-12-17 15:26:17 +00:00
Charlie Marsh
0a83bf7dd5 Respect --torch-backend in uv tool commands (#17117)
## Summary

Like `uv pip`, these don't require a universal resolution, so
`--torch-backend` is easy to support.
2025-12-16 19:23:50 -05:00
Charlie Marsh
e603761862 Support remote pylock.toml files (#17119)
## Summary

Closes https://github.com/astral-sh/uv/issues/17112.
2025-12-16 19:16:23 -05:00
Zanie Blue
4f6f56b070 Add ty to the README (#17139) 2025-12-16 09:39:59 -06:00
Zanie Blue
66f7093ad2 Move a couple README items into the FAQ (#17148) 2025-12-16 08:36:06 -06:00
Zanie Blue
60df92f9aa Copy the Code of Conduct from Ruff (#17145) 2025-12-16 14:12:15 +00:00
konsti
0cee76417f Bump version to 0.9.18 (#17141)
It's been a week.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
0.9.18
2025-12-16 13:32:35 +00:00
jkipper
af348c2a88 Ignore pyproject index username in lockfile comparison (#16995)
<!--
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

Pyproject.toml index url may contain a username while lockfile doesn't.
Treat it as the same index to prevent unintended package updates

Fixes #16436

---------

Co-authored-by: konstin <konstin@mailbox.org>
2025-12-16 10:47:50 +00:00
Diyor Khayrutdinov
b58f543e5e Support redirects in uv publish (#17130)
<!--
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

Follow redirects for `uv publish`. Related issue:
https://github.com/astral-sh/uv/issues/17126.

## Test Plan

<!-- How was it tested? -->
Added a unit test to test the custom redirect logic.

---------

Co-authored-by: konstin <konstin@mailbox.org>
2025-12-16 09:04:28 +00:00
Charlie Marsh
13e7ad62cb Accept --torch-backend in [tool.uv] (#17116)
## Summary

I'd like to add `--torch-backend` to `uv tool`, so this PR lifts the
setting out of `[tool.uv.pip]`. Like other settings, if it's in
`[tool.uv.pip]`, it will take preference for `uv pip` operations.
2025-12-15 20:18:40 -05:00
Tomasz Kramkowski
94c97b6434 Add value hints to command line arguments to improve shell completion accuracy (#17080)
## Summary

This partially addresses #17076 by adding `value_hint` to various
arguments.

For cases where an option takes a path to either specifically a file or
a directory directory, `ValueHint::FilePath` and `ValueHint::DirPath`
are used respectively to try to limit the amount of noise presented by
completions in shells which support it.

For cases where a URL (and only a URL, not a path) can be supplied,
`ValueHint::Url` is used.

For cases where a python interpreter is to be specified,
`ValueHint::CommandName` is used which will tab complete from `$PATH` by
default, but will fall back to completing executable filenames if you
start typing a path.

Finally, for the many cases where there is no built in completion which
would make sense, and where default completion of a path would make no
sense (e.g. a package name, or version specifier, or date)
`ValueHint::Other` is used to explicitly disable completion.

## Test Plan

Manually tested a bunch of these. These _could_ be automated in the
sense that we could snapshot the completion from zsh but I've not
thought about how that could be done yet.
2025-12-15 18:29:32 +00:00
konsti
af95677b9b Update cargo shear (#17106)
Requires a companion PR that updates the GitHub Action.
2025-12-15 18:46:35 +01:00
konsti
a5d50a20d2 Better rendering for multiline error messages (#17132)
Split out from https://github.com/astral-sh/uv/pull/17110

Indent multiline error messages properly, and add a test with a
multiline context and a context below since that combination isn't
captured atm.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-12-15 16:29:11 +00:00
samypr100
a768a9d111 Relax error when using uv add with UV_GIT_LFS set (#17127)
## Summary

Closes https://github.com/astral-sh/uv/issues/17083

Previously having `UV_GIT_LFS` set would cause an error when adding a
non-git requirement such as ```error: `requirement` did not resolve to a
Git repository, but a Git extension (`--lfs`) was provided.```

## Test Plan

Additional test has been added.
2025-12-15 08:26:14 -06:00
Tomasz Kramkowski
d20948bec2 Support creating lock files on ExFAT on MacOS (#17115)
## Summary

Fix #16859 by falling back to simply creating the lock file and then
attempting to apply permissions in cases where the temporary lockfile
cannot be renamed without overwriting (persist_noclobber) due to lack of
underlying support from the filesystem.

I've also improved the error handling.

## Test Plan

Manually on MacOS with an ExFAT partition.

~~~ bash session
$ hdiutil create -size 1g -fs ExFAT -volname EXFATDISK exfat.dmg
$ hdiutil attach exfat.dmg
$ cd /Volumes/EXFATDISK
$ uv init --bare --cache-dir build/uv/cache -v 
~~~
2025-12-15 14:05:05 +00:00
Ben Beasley
a2d64aa224 Update spdx dependency to 0.13 (#17129)
<!--
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

Updates the `spdx` dependency from 0.12.x to the latest release, 0.13.2.

https://github.com/EmbarkStudios/spdx/blob/0.13.2/CHANGELOG.md

Here in uv upstream, this just helps keep dependencies up to date; there
isn’t any other particular specific motivation or benefit. Downstream in
Fedora, this change allows me to avoid maintaining a `rust-spdx0.12`
compat package.
<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

<!-- How was it tested? -->
`cargo nextest run -- --skip python_install::python_install_pyodide`
2025-12-14 13:25:06 -05:00
haruna
c43315f4eb Change exclude-newer type into optional string (#17121)
<!--
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: #17103 

## Test Plan

The following settings will be enabled for the schema.

```toml
[tool.uv]
exclude-newer = "P7D"
```
2025-12-13 13:42:01 -06:00