6027 Commits

Author SHA1 Message Date
Zanie Blue
0fda1525eb Bump version to 0.9.24 (#17395) 2026-01-09 22:09:11 +00:00
Zanie Blue
1a72f8c677 Fix handling of UV_NO_SYNC=1 uv run ... (#17391)
Closes #17390

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-09 21:37:20 +00:00
Charlie Marsh
ef83fc34bc Rebuild dynamic distribution when version changes with --no-cache (#17387)
## Summary

Well-explained in https://github.com/astral-sh/uv/issues/17370. I don't
see a reason _not_ to fix this.

Closes https://github.com/astral-sh/uv/issues/17370.
2026-01-09 15:43:20 -05:00
Zanie Blue
00f07541a1 Bump version to 0.9.23 (#17385) 2026-01-09 19:09:04 +00:00
Zanie Blue
dbb4e0b1c7 Recognize armv8l as an alias for armv7l in platform tag parsing (#17384)
Closes #17375

It looks like this was missed in
https://github.com/astral-sh/uv/pull/8881 and now that we fail if wheel
tags do not match the target environment (see
https://github.com/astral-sh/uv/pull/16074), we do not allow armv8l
wheels to installed in environments where the interpreter reports
armv7l.

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-09 12:29:23 -06:00
Charlie Marsh
7bb6e3109c Split OIDC and S3 clients in publish (#17379) 2026-01-09 12:15:58 -05:00
Charlie Marsh
a959d625b2 Include headers when uploading to S3 (#17381)
## Summary

The server sends these down, and the pre-signed URL _requires_ them to
be set.
2026-01-09 11:32:51 -05:00
Zanie Blue
a8ecd7c477 Support relative paths in UV_PYTHON_BIN_DIR and UV_TOOL_BIN_DIR (#17367)
Closes #17364

Extends #17365

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-09 07:21:46 -06:00
Charlie Marsh
85dedc8051 Enable uploads via pre-signed URLs (#17349)
## Summary

For pyx, we can allow uploads that bypass the registry and send the file
directly to S3. This is an opt-in feature, enabled via the `--direct`
flag.
2026-01-08 21:26:34 -05:00
Zanie Blue
25d691eeaf Document why parse_xdg_path requires absolute paths (#17365)
Related to #17364

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-08 21:22:41 +00:00
Tom Schafer
29285db48e Fix missing dependencies on synthetic root in SBOM export (#17363) 2026-01-08 13:19:34 -05:00
Zanie Blue
b5d3186061 Add authentication tests for URLs with an empty username (#17347)
Add test cases for https://github.com/astral-sh/uv/issues/17343 where
you have an empty username and non-empty password

These don't include the "redirect" aspect.

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-08 07:41:22 -06:00
renovate[bot]
1447694188 Update Rust crate toml_edit to 0.24.0 (#17303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: William Woodruff <william@astral.sh>
2026-01-07 21:14:12 +00:00
konsti
6b2d6f2c40 Only write portable paths in RECORD (#17339)
The spec allows both, but we're already using forward paths for paths
that are not created by uv.

See
* https://github.com/astral-sh/uv/issues/14446
* https://github.com/python/importlib_metadata/issues/528

Closes #14446

---------

Co-authored-by: Tomasz Kramkowski <tom@astral.sh>
2026-01-07 20:40:18 +01:00
William Woodruff
9ddaae2244 Initial PEP 792 types and index parsing (#17311) 2026-01-07 16:35:39 +00:00
William Woodruff
dbe5481d5c Use DisplaySafeUrl to readact a URL in a trace log (#17346) 2026-01-07 15:55:08 +00:00
Charlie Marsh
cd55d1ce12 Manually parse and reconcile Boolean environment variables (#17321)
## Summary

This gives us more flexibility since we can avoid erroring on
"conflicts" when one option is disabled (e.g., `UV_FROZEN=0 uv lock
--check`).

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

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 20:43:04 +00:00
Eli Uriegas
e67dbce3fe Allow setting proxy variables via global / user configuration (#16918)
<!--
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? -->

This allows users to set the HTTP, HTTPS, and no proxy variables via the
configuration files like ~pyproject.toml~ and uv.toml.

Users can set like so:

`uv.toml`
```toml
https-proxy = "http://my_cool_proxy:10500"
http-proxy = "http://my_cool_proxy:10500"
no-proxy = [
  "dontproxyme.com",
  "localhost",
]
```

Resolves https://github.com/astral-sh/uv/issues/9472

## Test Plan

<!-- How was it tested? -->
It also adds a new integration test for the proxy support in
`uv-client`.

This was tested on some of our developer machines with our proxy setup
using `~/.config/uv/uv.toml` with values like:

```toml
https-proxy = "http://my_cool_proxy:10500"
http-proxy = "http://my_cool_proxy:10500"
no-proxy = [
  "dontproxyme.com",
  "localhost",
]

```

---------

Signed-off-by: Eli Uriegas <eliuriegas@meta.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-01-06 11:13:59 -06:00
Leo H
cc1ca8b4a1 Avoid broken build artifacts on build failure (#17276)
## Summary

Fixes https://github.com/astral-sh/uv/issues/17232

When `uv build` fails (e.g., due to missing `__init__.py`), partial
distribution
files were being left in the `dist/` directory. 

### Changes

- Use `NamedTempFile` to write build output to a temporary file first
- Only persist the file to the final location on successful build
- If build fails, the temporary file is automatically cleaned up
- Added `Error::Persist` variant for handling persistence failures

## Test Plan

Added `no_partial_files_on_build_failure` test that verifies:

1. `build_source_dist` fails when `__init__.py` is missing
2. `build_wheel` fails when `__init__.py` is missing  
3. The `dist/` directory remains empty after both failures (no partial
files)

---------

Co-authored-by: Hayashi Reo <reo@wantedly.com>
2026-01-06 15:27:05 +01:00
Zanie Blue
d7cdd58d63 Format JSON schema with prettier at generation time (#17272)
Formats the generated JSON schema with prettier so it doesn't fail CI
lints immediately after update.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-06 08:20:45 -06:00
konsti
82a6a66b81 Bump version to 0.9.22 (#17333)
There's a hyper-util bump to get out separate from other reqwest related
changes.
2026-01-06 11:23:12 +01:00
konsti
4950dd475b Remove retries duplication uv_client error (#17325)
Previously, we had a retry count both on the top level error type, and
on an error variant, and had a conversion step in between. When
reviewing #17274, I noticed we can simplify that.
2026-01-06 09:20:02 +00:00
Charlie Marsh
6049ddcb86 Add manylinux to armv6l match (#17328)
## Summary

See: https://github.com/astral-sh/uv/pull/17317/changes#r2662205930. I
omitted these because we technically don't allow this for manylinux, but
this seems more consistent.
2026-01-05 19:37:08 -05:00
William Woodruff
a27e0c850d Use Cow<str> for deserialization everywhere (#17330) 2026-01-05 17:57:35 -05:00
Zanie Blue
478c884704 Use Cow<str> for deserialization map keys in PypiFile and PyxFile (#17327)
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-05 15:59:44 -05:00
Tomasz Kramkowski
df62ee6f4d Track retry counts originating from early middleware errors (#17274)
## Summary

Fixes #17266.

The retry count was getting dropped by
`ErrorKind::from_retry_middleware` and `<Error as
From<ErrorKind>>::from` so we were doing more retries than we should
have.

## Test Plan

Added a testcase for the specific error path in the issue. Added an
expect to the other retry test too.
2026-01-05 20:06:38 +00:00
Charlie Marsh
691719f906 Filter PPC wheels et al in lockfile (#17317)
## Summary

Closes https://github.com/astral-sh/uv/issues/17313.
2026-01-05 10:25:02 -05:00
Charlie Marsh
a3b1aee8c7 Use a dedicated error message when lockfile can't be found (#17318)
## Summary

Closes https://github.com/astral-sh/uv/issues/17259.
2026-01-05 07:40:56 -05:00
konsti
24cc4a789b Fix some Rust 1.92 clippy lints (#17324)
Saw this as a build failure in a CI job.

Excluding https://github.com/zkat/miette/pull/459
2026-01-05 11:11:43 +00:00
nwyin
2318e48e81 Gate python_install tests on python-managed feature (#17312)
## Summary

Gates four tests in `python_find.rs` that call `python_install()` behind
the `python-managed` feature flag. These tests attempt to download
Python versions from the network (free-threaded and pre-release
versions) which fail in offline build environments.

  Fixes #16431

  ## Test Plan

Verified that the gated tests match the pattern used elsewhere in the
codebase where the entire `python_install` module is already gated
behind `#[cfg(feature = "python-managed")]`.
2026-01-03 16:30:50 -06:00
Zanie Blue
04f463f036 Add some missing git feature cfgs for imports (#17273)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-30 15:56:31 +00:00
Zanie Blue
0dc9556adb Bump version to 0.9.21 (#17270) 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
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
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.
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
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
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
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
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
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