Commit Graph

507 Commits

Author SHA1 Message Date
Zanie Blue 4e13f082a8 Upgrade based on outdated build versions in uv python upgrade (#17653) 2026-01-26 15:15:30 -06:00
Tomasz Kramkowski 6e3ba2f03d Introduce PreviewFeature to clarify intent throughout the codebase (#17670)
## Summary

This PR replaces `bitflags` in favour of `enumflags2` (which we already
transitively depended on) so that `PreviewFeatures` can be replaced with
`PreviewFeature` which is an enum. This clarifies intent in cases where
we only care about one specific `PreviewFeature`.

To avoid a bunch of boilerplate changes, the `Preview` wrapper has been
kept and creation now involves a `&[PreviewFeature]` in all cases. The
alternative was to have everything which initialises a `Preview` use
`BitFlags` directly and possibly to remove `Preview` entirely but this
keeps things simpler and limits the changes throughout the rest of the
codebase solely to changes which deal with the name changes (ALL_CAPS to
PascalCase) and the impact on `--show-settings` which I don't believe we
care about stability of output for?

The changes to `--show-settings` could be avoided with some custom
`Debug` implementation but that seems excessive.

This PR will impact #16452. But the changes were inspired by trying to
remove the need for that particular PR to add more runtime type
checking.

## Test Plan

Existing tests were adjusted (I also fixed some missing cases). The test
for panicking in cases which are now prevented through the use of type
changes has been dropped. All the rest of the tests were ran, snapshot
changes reviewed and applied.
2026-01-23 17:19:23 +00:00
github-actions[bot] 0b59a9ef3f Upgrade Pyodide to 0.29.2 (#17652)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2026-01-22 00:47:11 +00:00
github-actions[bot] ed32e78e21 Upgrade to GraalPy 25.0.2 (#17634)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2026-01-21 09:21:46 -06:00
Zanie Blue 3e22637c93 Use #[expect(clippy::...)] throughout and drop unused supressions (#17537)
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-20 21:52:06 +00:00
Tomasz Kramkowski f7d1215a98 Make uv pip compile attempt to download a specified --python-version if it can. (#17249)
## Summary

Addresses #16709. Now specifying a simple version with `--python` or
specifying a version using `--python-version` will result in the
specified version getting downloaded with a fallback to the previous
behaviour if the download fails for some transient reason or if
downloads are disabled.

The behaviour of how `--python` gets treated as `--python-version`, if a
"simple version" is specified, is kept. This means that `--python 3.7`
turns into a soft requirement. This seems at odds with how other similar
parts of UV work, but there seem to be quite a few tests which test for
this specific behaviour and I think this is best saved for a separate
issue.

## Test Plan

I added a test case which would previously fall back to the default
interpreter and warn about it.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-01-16 14:01:56 +00:00
Zanie Blue ee4f003628 Bump version to 0.9.26 (#17496) 2026-01-15 14:25:54 -06:00
konsti 6db2c62906 Normalize test snapshots (#17486)
This reduces the churn when changing test snapshots, as insta updates
the quotes when the contents change. Instead, we decouple it by updating
the quotes in bulk here.

Created by:

```
cargo insta test --accept --force-update-snapshots
```
2026-01-15 17:50:10 +01:00
Luis Nell db7d1a2058 Add a hint to use a newer uv when a managed Python download is not found (#17461)
## Summary

Suggest using a newer uv version when a managed python installation request
fails with `NoDownloadFound`.

Before:

```
error: No interpreter found for Python ==3.14.* in managed installations or search path
```

After:

```
error: No interpreter found for Python ==3.14.* in managed installations or search path

hint: uv embeds available Python downloads and may require an update to install new versions. Consider retrying on a newer version of uv.
```

## Test Plan

Integration test added for this case.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-01-15 09:58:41 +00:00
github-actions[bot] 0c08cba0c4 Sync latest Python releases (#17480)
Automated update for Python releases.

Co-authored-by: jjhelmus <1050278+jjhelmus@users.noreply.github.com>
2026-01-15 04:21:14 +00:00
Zanie Blue 38fcac0f36 Bump version to 0.9.25 (#17449) 2026-01-13 16:55:34 -06:00
github-actions[bot] c6a02873fd Sync latest Python releases (#17445)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2026-01-13 22:01:12 +00:00
Gyeongjae Choi 7b497d48bd Use latest Pyodide version for each python version (#17372)
## 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)
```
2026-01-12 17:59:26 -06:00
Zanie Blue 0fda1525eb Bump version to 0.9.24 (#17395) 2026-01-09 22:09:11 +00:00
Zanie Blue 00f07541a1 Bump version to 0.9.23 (#17385) 2026-01-09 19:09:04 +00: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
William Woodruff a27e0c850d Use Cow<str> for deserialization everywhere (#17330) 2026-01-05 17:57:35 -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
Zanie Blue 0dc9556adb Bump version to 0.9.21 (#17270) 2025-12-30 15:46:08 +00: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
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 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
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
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 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
konsti 0cee76417f Bump version to 0.9.18 (#17141)
It's been a week.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-12-16 13:32:35 +00:00
Zanie Blue 2b5d65e61d Bump version to 0.9.17 (#17058) 2025-12-09 16:36:00 -06:00
github-actions[bot] 81c99dd438 Sync latest Python releases (#17057)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-12-09 22:30:11 +00:00
Zanie Blue a63e5b62e3 Bump version to 0.9.16 (#17008) 2025-12-06 07:52:06 -06:00
github-actions[bot] 9635258867 Sync latest Python releases (#16943)
Automated update for Python releases.

---------

Co-authored-by: jjhelmus <1050278+jjhelmus@users.noreply.github.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-12-06 00:03:57 +00:00
konsti b73281d222 Error when built wheel is for the wrong platform (#16074)
Error when a built wheel is for the wrong platform. This can happen
especially when using `--python-platform` or `--python-version` with `uv
pip install`.

Fixes #16019
2025-12-05 16:04:53 +01:00
Zanie Blue f6ad3dcd57 Regenerate the crates.io readmes on release (#16992)
Otherwise, they're stale!
2025-12-04 19:19:36 -06:00
konsti 62bf92132b Add a 5 min default timeout for deadlocks (#16342)
When a process is running and another calls `uv cache clean` or `uv
cache prune` we currently deadlock - sometimes until the CI timeout
(https://github.com/astral-sh/setup-uv/issues/588). To avoid this, we
add a default 5 min timeout waiting for a lock. 5 min balances allowing
in-progress builds to finish, especially with larger native
dependencies, while also giving timely errors for deadlocks on (remote)
systems.

Commit 1 is a refactoring.

This branch also fixes a problem with the logging where acquired and
released resources currently mismatch:

```
DEBUG Acquired lock for `https://github.com/tqdm/tqdm`
DEBUG Using existing Git source `https://github.com/tqdm/tqdm`
DEBUG Released lock at `C:\Users\Konsti\AppData\Local\uv\cache\git-v0\locks\16bb813afef8edd2`
```
2025-12-04 14:59:04 +01:00
konsti 2748dce860 Fix Pyston tags (#16972)
This was discovered by https://github.com/astral-sh/uv/pull/16074, where
the wrong tag now fails the Pyston integration test.

I'm not sure what the exact schema of the cache tag is, but since the
project is dead, I don't expect any new non-matching versions to follow.
2025-12-04 10:18:41 +01:00
samypr100 ed63be5dab chore(🧹): const env var usage cleanup (#16950)
## Summary

* Updates existing references to use EnvVars where usage was missing.
* Adds missing entries to env var usages, e.g. new env var declarations
in uv-trampoline, tests, etc.
* Note: this doesn't affect trampoline sizes as the end result is the
same
* Fixes versioning of `UV_HIDE_BUILD_OUTPUT`.

## Test Plan

Existing Tests. Compiled the trampolines locally to verify zero changes
(size, binary).

## Question

Will this complicate the crates publishing release process? I'm not
certain yet if it will be an issue for uv-trampoline (non-workspace
member) to reference a uv workspace member from a bump & release
perspective wrt lock files. If so, I'll revert the uv-trampoline changes
but keep the others.
2025-12-02 22:16:46 -08:00
Zanie Blue e7af5838bb Bump version to 0.9.15 (#16942) 2025-12-02 17:48:28 -06:00
Zanie Blue 9fc07c8773 Add CPython 3.14.1 and 3.13.10 (#16941) 2025-12-02 23:36:44 +00:00
Zanie Blue 99c40f74c5 Link to the uv version in crates.io member READMEs (#16939)
Closes https://github.com/astral-sh/uv/issues/16931
2025-12-02 20:02:22 +00:00
Zsolt Dollenstein 05814f9cd5 Bump version to 0.9.14 (#16909) 2025-12-01 11:52:15 -05:00
Zanie Blue 735b87004c Bump version to 0.9.13 (#16862) 2025-11-26 15:12:54 +00:00
Zanie Blue 17c1061676 Fix the links to uv in crates.io member READMEs (#16848) 2025-11-25 18:47:32 +00:00
Zanie Blue 0fb1233363 Bump version to 0.9.12 (#16840) 2025-11-24 23:22:12 +00:00
Zanie Blue 7b8240dca9 Generate a README for crate members too (#16812)
We skip members with existing READMEs for now.

Follows #16809 and #16811
2025-11-21 15:44:05 -06:00
Zanie Blue 1de0cbea94 Use the word "internal" in crate descriptions (#16810)
ref
https://github.com/astral-sh/uv/pull/16809#pullrequestreview-3494007588
2025-11-21 13:22:47 -06:00
Zanie Blue 563438f13d Fix documentation links for crates (#16801)
Part of https://github.com/astral-sh/uv/issues/4392

We shouldn't link to PyPI, and dropping the workspace-level
documentation link should mean that we get the auto-generated `docs.rs`
links.
2025-11-21 10:44:58 -06:00
Zanie Blue dfe89047bb Publish to crates.io (#16770) 2025-11-20 21:26:44 +00:00
github-actions[bot] e799a088a5 Sync latest Python releases (#16792)
Automated update for Python releases.

---------

Co-authored-by: jjhelmus <1050278+jjhelmus@users.noreply.github.com>
Co-authored-by: Jonathan Helmus <jjhelmus@gmail.com>
2025-11-20 20:27:40 +00:00
Meitar Reihan b9826778b9 Support http/https URLs in uv python --python-downloads-json-url (#16542)
continuation PR based on #14687

---------

Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
Co-authored-by: Aria Desires <aria.desires@gmail.com>
2025-11-14 17:51:24 -05:00
Meitar Reihan 7f4d8c67a8 Account for python_downloads_json_url on Pre-release Python version warnings (#16737)
Solves #16711
2025-11-14 15:12:35 -06:00