Commit graph

4921 commits

Author SHA1 Message Date
Zanie Blue
de1479c4ef Use index URL instead of package URL for keyring credential lookups (#12651)
Some registries (like Azure Artifact) can require you to authenticate
separately for every package URL if you do not authenticate for the
/simple endpoint. These changes make the auth middleware aware of index
URL endpoints and attempts to fetch keyring credentials for such an
index URL when making a request to any URL it's a prefix of.

The current uv behavior is to cache credentials either at the request
URL or realm level. But with these changes, we also need to cache
credentials at the index level. Note that when uv does not detect an
index URL for a request URL, it will continue to apply the old behavior.

Addresses part of #4056
Closes #4583
Closes #11236
Closes #11391
Closes #11507
2025-04-29 16:37:00 -05:00
Zanie Blue
514a7ea6df Require the command in uvx <name> to be available in the Python environment (#11603)
Closes https://github.com/astral-sh/uv/issues/7804

Includes a few small minor changes to the messaging, but the primary
change is that in, e.g., `uvx foo`, if the `foo` package does not
provide the `foo` executable we will no longer execute an arbitrary
`foo` executable if present on the `PATH`. This prevents confusing and
surprising behavior, such as the user reported where they did `uv tool
install foobar` (which provides `foo`) then `uvx foo` (which does not
provide `foo`) later falls back to the executable provided by `foobar`
since it's on the `PATH`. We don't enforce this for `--from`, so things
like `uvx --from foo bash -c "..."` are still totally valid. We also
still allow `uvx foo` where the `foo` executable is provided by a
_dependency_ of `foo` instead of `foo` itself.

Most of the diff here is consolidating the logic of the
`hint_on_not_found` and `warn_executable_not_provided_by_package `
utilities.
2025-04-29 16:37:00 -05:00
Zanie Blue
6cc2202799 Ignore arbitrary Python requests in version files (#12909)
Closes https://github.com/astral-sh/uv/issues/12605
2025-04-29 16:37:00 -05:00
Zanie Blue
1988e209ef Treat empty UV_PYTHON_INSTALL_DIR as unset (#12907)
Same as https://github.com/astral-sh/uv/pull/12905 — found via regex
2025-04-29 16:37:00 -05:00
Zanie Blue
cac6560b4f Treat empty UV_TOOL_DIR as unset (#12905)
Closes https://github.com/astral-sh/uv/issues/8608
2025-04-29 16:37:00 -05:00
Aria Desires
318949ade6 Error on unknown dependency object specifiers (#12841)
This reverts commit dd788a0f47.

And relands #12811, for 0.7.0
2025-04-29 16:37:00 -05:00
Charlie Marsh
a3dae2512c
Disallow mixing requirements across PyTorch indexes (#13179)
Some checks are pending
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / integration test | uv_build (push) Blocked by required conditions
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
## Summary

If you use `--torch-backend=auto`, we want to avoid selecting (e.g.) a
`+cu124` build of `torch` alongside a `+cu126` build of `torchvision`.
2025-04-28 20:06:18 +00:00
Bartosz Sokorski
6292748371
Add poetry-core as a build backend option (#12781)
<!--
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 adds `poetry-core` as a build backend choice. 

## Test Plan

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

---------

Co-authored-by: konstin <konstin@mailbox.org>
2025-04-28 19:11:52 +00:00
Ahmed Ilyas
4680c9b22d
Add more default group tests and fix default groups for uv add (#13182)
## Summary

Brings in a bug fix for `uv add` w.r.t default groups from
https://github.com/astral-sh/uv/pull/12964, see comment:
https://github.com/astral-sh/uv/pull/12964#discussion_r2060775131

Adds additional test coverage for default groups in `run`, `remove`,
`add`.

## Test Plan

`cargo test`
2025-04-28 15:02:43 -04:00
Ahmed Ilyas
f872917d33
Refactor ExtraSpecification to support default-extras (#12964)
## Summary

Part of #8607. This is a pure refactor aimed at paving the way for
supporting the `default-extras` configuration in the `pyproject.toml`
file.

The `ExtraSpecification` struct has been refactored to align more
closely with the
[`DependencyGroups`](256b100a9e/crates/uv-configuration/src/dependency_groups.rs (L9))
struct.

## Test Plan

Existing tests.
2025-04-28 13:30:14 -04:00
konsti
85d8b07026
Remove flyte-short-incompatible benchmark for too many false positives (#13181)
The benchmark has recurring false positives
(https://github.com/astral-sh/uv/issues?q=flyte-short-incompatible%20),
so we're removing it.
2025-04-28 18:01:34 +02:00
Charlie Marsh
bb0158d005
Use upload-time rather than upload_time in uv.lock (#13176)
## Summary

In https://github.com/astral-sh/uv/pull/12968, we added support for
upload time to `uv.lock`, but stylized as `upload_time`. The other keys
in `uv.lock` use kebab casing, as in common in Python formats, so this
really should've been `upload-time`. I want to change it ASAP to
minimize churn for users. Any users that already upgraded will of course
experience churn in their files a second time. But if we don't change it
now, we'll only increase the surface area of affected users.

So, this PR uses `upload-time` instead, but continues reading
`upload_time` to make it non-breaking.
2025-04-28 11:01:17 -04:00
renovate[bot]
6402f98cbd
Update Rust crate windows to 0.61.0 (#13159)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [windows](https://redirect.github.com/microsoft/windows-rs) |
dependencies | minor | `0.59.0` -> `0.61.0` |

---

### Release Notes

<details>
<summary>microsoft/windows-rs (windows)</summary>

###
[`v0.61.0`](https://redirect.github.com/microsoft/windows-rs/releases/tag/0.61.0)

[Compare
Source](https://redirect.github.com/microsoft/windows-rs/compare/0.60.0...0.61.0)

Major crate updates:

-   `windows` 0.59.0
-   `windows-core` 0.59.0
    -   `windows-implement` 0.59.0
    -   `windows-interface` 0.59.0
-   `windows-targets` 0.53.0
    -   `windows_i686_msvc` 0.53.0
    -   `windows_x86_64_msvc` 0.53.0
    -   `windows_aarch64_msvc` 0.53.0
    -   `windows_i686_gnu` 0.53.0
    -   `windows_x86_64_gnu` 0.53.0
    -   `windows_i686_gnullvm` 0.53.0
    -   `windows_x86_64_gnullvm` 0.53.0
    -   `windows_aarch64_gnullvm` 0.53.0
-   `windows-bindgen` 0.59.0
-   `windows-registry` 0.4.0
-   `windows-result` 0.3.0
-   `windows-strings` 0.3.0
-   `cppwinrt` 0.2.0

Minor crate updates:

-   `windows-version` 0.1.2

Excluded:

-   `windows-sys` 0.59.0

Things to keep in mind:

- The tag/release names no longer map directly to the crate versions, so
to [find
samples](https://redirect.github.com/microsoft/windows-rs/tree/master/crates/samples)
for a particular release requires looking at [the
releases](https://redirect.github.com/microsoft/windows-rs/releases)
page and finding the release that most recently updated a particular
crate.

- The `windows-bindgen` crate includes the major code generation
overhaul that brings many improvements - be sure to check out the PR
description for more information. The resulting code gen depends on the
new version of `windows-core` and its dependencies, unless you include
the `--sys` option.
[#&#8203;3359](https://redirect.github.com/microsoft/windows-rs/issues/3359)

- The `cppwinrt` crate constitutes a major update due to streamlining
the error handling.
[#&#8203;3415](https://redirect.github.com/microsoft/windows-rs/issues/3415)

- The `windows-registry`, `windows-strings,` and `windows-result` crates
are also major version updates since they include small breaking
changes.

- The `windows-targets` crate finally receives a major version update,
the first in over a year. This is due to
[#&#8203;3359](https://redirect.github.com/microsoft/windows-rs/issues/3359)
and
[#&#8203;3342](https://redirect.github.com/microsoft/windows-rs/issues/3342)
potentially introducing breaking changes. Although unlikely, these
updates introduced sufficient changes that make it hard to ensure that
the `windows-targets` libs don't break existing code. As we're updating
`windows-targets` anyway, I took the liberty to bump the MSRV to 1.60 -
to match the latest version of `windows-sys` - and remove the old but
unused doc macro feature. Both remained for compatibility with very old
dependents of the `windows-targets` crate.

- The `windows-version` crate receives a minor update to update its
dependency on the `windows-targets` crate.

- Beyond these specifics, this update is the culmination of around 6
months worth of work on the `windows-rs` project. The biggest
improvements comes from the new code generation engine, but many other
improvements are now also available for production. This includes
support for many new lints, warnings, and suggestions provided by the
Rust toolchain; much smaller code gen thanks to deriving many more
traits; more efficient code gen; major improvements to WinRT type system
and implementation support; more robust and consistent error handling;
stock collection and async support; improved support for class
hierarchies; and much more!

In addition to "what's changed" below, check out what's changed for
notes for
[0.60.0](https://redirect.github.com/microsoft/windows-rs/releases/tag/0.60.0)
and
[0.59.0](https://redirect.github.com/microsoft/windows-rs/releases/tag/0.59.0)
for additional changes that roll up to the crates published as part of
this release.

#### What's Changed

- Remove improper_ctypes workaround by
[@&#8203;ChrisDenton](https://redirect.github.com/ChrisDenton) in
[https://github.com/microsoft/windows-rs/pull/3296](https://redirect.github.com/microsoft/windows-rs/pull/3296)
- Bump rollup from 2.79.1 to 2.79.2 in /web/features by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3299](https://redirect.github.com/microsoft/windows-rs/pull/3299)
- Update jsonschema requirement from 0.20 to 0.21 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3301](https://redirect.github.com/microsoft/windows-rs/pull/3301)
- Address Rust nightly compiler warnings by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3311](https://redirect.github.com/microsoft/windows-rs/pull/3311)
- Update jsonschema requirement from 0.21 to 0.22 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3310](https://redirect.github.com/microsoft/windows-rs/pull/3310)
- Update workflows to ignore paths on pull request by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3312](https://redirect.github.com/microsoft/windows-rs/pull/3312)
- Fix remaining `std` references in `windows` and `windows-core` crates
for `no_std` builds by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3317](https://redirect.github.com/microsoft/windows-rs/pull/3317)
- Bump cookie and express in /web/features by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3318](https://redirect.github.com/microsoft/windows-rs/pull/3318)
- Fix nested struct sort order by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3321](https://redirect.github.com/microsoft/windows-rs/pull/3321)
- Update jsonschema requirement from 0.22 to 0.23 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3323](https://redirect.github.com/microsoft/windows-rs/pull/3323)
- Add `unwrap` helper for `NTSTATUS` by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3324](https://redirect.github.com/microsoft/windows-rs/pull/3324)
- Bump http-proxy-middleware from 2.0.6 to 2.0.7 in /web/features by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3331](https://redirect.github.com/microsoft/windows-rs/pull/3331)
- Remove "implement" feature by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3333](https://redirect.github.com/microsoft/windows-rs/pull/3333)
- Update web workflow by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3344](https://redirect.github.com/microsoft/windows-rs/pull/3344)
- Update Windows metadata by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3342](https://redirect.github.com/microsoft/windows-rs/pull/3342)
- Bump cross-spawn from 7.0.3 to 7.0.6 in /web/features by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3347](https://redirect.github.com/microsoft/windows-rs/pull/3347)
- fix: remove use of std in windows-strings h! macro by
[@&#8203;vthib](https://redirect.github.com/vthib) in
[https://github.com/microsoft/windows-rs/pull/3356](https://redirect.github.com/microsoft/windows-rs/pull/3356)
- Major `windows-bindgen` update by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3359](https://redirect.github.com/microsoft/windows-rs/pull/3359)
- Harden reg-free class activation by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3365](https://redirect.github.com/microsoft/windows-rs/pull/3365)
- Simpler bindings generation by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3367](https://redirect.github.com/microsoft/windows-rs/pull/3367)
- `windows-bindgen` should generate `no_std` bindings by default by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3366](https://redirect.github.com/microsoft/windows-rs/pull/3366)
- Prefer optional over convertible parameters by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3368](https://redirect.github.com/microsoft/windows-rs/pull/3368)
- Remove unused extensions by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3369](https://redirect.github.com/microsoft/windows-rs/pull/3369)
- Simpler code generation by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3370](https://redirect.github.com/microsoft/windows-rs/pull/3370)
- Update dependencies by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3374](https://redirect.github.com/microsoft/windows-rs/pull/3374)
- Simpler code gen for Boolean parameters by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3373](https://redirect.github.com/microsoft/windows-rs/pull/3373)
- Remap `BOOLEAN` to `bool` by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3376](https://redirect.github.com/microsoft/windows-rs/pull/3376)
- Avoid generating `transmute` for input value type parameter bindings
by [@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3377](https://redirect.github.com/microsoft/windows-rs/pull/3377)
- Fix macro docs by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3378](https://redirect.github.com/microsoft/windows-rs/pull/3378)
- Streamline error handling in `windows-bindgen` by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3379](https://redirect.github.com/microsoft/windows-rs/pull/3379)
- Improve WinRT event representation and testing by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3382](https://redirect.github.com/microsoft/windows-rs/pull/3382)
- Use `track_caller` to make debugging `bindgen` build script errors
easier by [@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3383](https://redirect.github.com/microsoft/windows-rs/pull/3383)
- `windows-bindgen` now uses `Ref` and `OutRef` for COM interface traits
by [@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3386](https://redirect.github.com/microsoft/windows-rs/pull/3386)
- Add static event test/sample for WinRT by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3389](https://redirect.github.com/microsoft/windows-rs/pull/3389)
- Verify param direction by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3390](https://redirect.github.com/microsoft/windows-rs/pull/3390)
- Ensure external references to static factories are generated correctly
by [@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3392](https://redirect.github.com/microsoft/windows-rs/pull/3392)
- Update `windows-bindgen` to support `unsafe_op_in_unsafe_fn` by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3393](https://redirect.github.com/microsoft/windows-rs/pull/3393)
- Make `Ref` work with more than just interface types by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3394](https://redirect.github.com/microsoft/windows-rs/pull/3394)
- Add PR preview deployments to web workflow by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3395](https://redirect.github.com/microsoft/windows-rs/pull/3395)
- Adjust web workflow to use gh-pages branch by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3397](https://redirect.github.com/microsoft/windows-rs/pull/3397)
- Streamline CRA deps and webpack config by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3396](https://redirect.github.com/microsoft/windows-rs/pull/3396)
- Address nightly clippy warnings about operator precedence by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3414](https://redirect.github.com/microsoft/windows-rs/pull/3414)
- Detect unsupported array parameters by
[@&#8203;iancormac84](https://redirect.github.com/iancormac84) in
[https://github.com/microsoft/windows-rs/pull/3402](https://redirect.github.com/microsoft/windows-rs/pull/3402)
- `cppwinrt` should consistently panic on failure by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3415](https://redirect.github.com/microsoft/windows-rs/pull/3415)
- Shorten sample crate names by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3416](https://redirect.github.com/microsoft/windows-rs/pull/3416)
- Use `track_caller` to make debugging `cppwinrt` build script errors
easier by [@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3417](https://redirect.github.com/microsoft/windows-rs/pull/3417)
- Fix provenance in direct32 sample by
[@&#8203;ChrisDenton](https://redirect.github.com/ChrisDenton) in
[https://github.com/microsoft/windows-rs/pull/3419](https://redirect.github.com/microsoft/windows-rs/pull/3419)
- Update web workflow to use external origin by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3420](https://redirect.github.com/microsoft/windows-rs/pull/3420)
- Avoid `transmute` where possible by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3421](https://redirect.github.com/microsoft/windows-rs/pull/3421)
- Update GitHub Actions runners by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3423](https://redirect.github.com/microsoft/windows-rs/pull/3423)
- Improve feature search UX, add dark mode, and update deps by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3422](https://redirect.github.com/microsoft/windows-rs/pull/3422)
- Release 0.61.0 by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3418](https://redirect.github.com/microsoft/windows-rs/pull/3418)

#### New Contributors

- [@&#8203;iancormac84](https://redirect.github.com/iancormac84) made
their first contribution in
[https://github.com/microsoft/windows-rs/pull/3402](https://redirect.github.com/microsoft/windows-rs/pull/3402)

**Full Changelog**:
https://github.com/microsoft/windows-rs/compare/0.60.0...0.61.0

###
[`v0.60.0`](https://redirect.github.com/microsoft/windows-rs/releases/tag/0.60.0)

[Compare
Source](https://redirect.github.com/microsoft/windows-rs/compare/0.59.0...0.60.0)

This release includes an update to the
[windows-registry](https://crates.io/crates/windows-registry) and
[windows-strings](https://crates.io/crates/windows-strings) crates,
mainly to provide various improvements to registry support for
[rustup](https://redirect.github.com/rust-lang/rustup).

#### What's Changed

- Add precise registry types and allocation-free queries and updates by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3184](https://redirect.github.com/microsoft/windows-rs/pull/3184)
- Add registry `Value` to/from `HSTRING` conversion by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3190](https://redirect.github.com/microsoft/windows-rs/pull/3190)
- Replace `From<&str>` for `GUID` with `TryFrom<&str>` by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3193](https://redirect.github.com/microsoft/windows-rs/pull/3193)
- Remove uneeded feature dependencies by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3201](https://redirect.github.com/microsoft/windows-rs/pull/3201)
- docs: add root level documentation for all libraries by
[@&#8203;Nerixyz](https://redirect.github.com/Nerixyz) in
[https://github.com/microsoft/windows-rs/pull/3202](https://redirect.github.com/microsoft/windows-rs/pull/3202)
- Cleanup doc testing by
[@&#8203;Nerixyz](https://redirect.github.com/Nerixyz) in
[https://github.com/microsoft/windows-rs/pull/3205](https://redirect.github.com/microsoft/windows-rs/pull/3205)
- Revert cfg doc by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3206](https://redirect.github.com/microsoft/windows-rs/pull/3206)
- Remove workaround for "unused" private fields by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3207](https://redirect.github.com/microsoft/windows-rs/pull/3207)
- Immutable Event implementation by
[@&#8203;lifers](https://redirect.github.com/lifers) in
[https://github.com/microsoft/windows-rs/pull/3198](https://redirect.github.com/microsoft/windows-rs/pull/3198)
- Always treat warnings as errors by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3210](https://redirect.github.com/microsoft/windows-rs/pull/3210)
- Consistent allocation failure handling by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3209](https://redirect.github.com/microsoft/windows-rs/pull/3209)
- Improve class hierarchy support by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3212](https://redirect.github.com/microsoft/windows-rs/pull/3212)
- Consistent allocation failure for stock collections by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3216](https://redirect.github.com/microsoft/windows-rs/pull/3216)
- Consistent allocation failure for `windows-registry` by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3215](https://redirect.github.com/microsoft/windows-rs/pull/3215)
- Add default "std" feature for `windows-registry` crate by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3214](https://redirect.github.com/microsoft/windows-rs/pull/3214)
- Overhaul async and future support by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3213](https://redirect.github.com/microsoft/windows-rs/pull/3213)
- Addressing new nightly Clippy warning by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3222](https://redirect.github.com/microsoft/windows-rs/pull/3222)
- Add async `ready` support by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3221](https://redirect.github.com/microsoft/windows-rs/pull/3221)
- Bump micromatch from 4.0.5 to 4.0.8 in /web/features by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3223](https://redirect.github.com/microsoft/windows-rs/pull/3223)
- Add file dialog sample by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3226](https://redirect.github.com/microsoft/windows-rs/pull/3226)
- Use relative path for extension by
[@&#8203;glandium](https://redirect.github.com/glandium) in
[https://github.com/microsoft/windows-rs/pull/3224](https://redirect.github.com/microsoft/windows-rs/pull/3224)
- Simplify trait bounds for interface implementations by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3227](https://redirect.github.com/microsoft/windows-rs/pull/3227)
- Remove unnecessary closure from generated code by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3228](https://redirect.github.com/microsoft/windows-rs/pull/3228)
- Bump webpack from 5.90.2 to 5.94.0 in /web/features by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3236](https://redirect.github.com/microsoft/windows-rs/pull/3236)
- Add async `spawn` support by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3235](https://redirect.github.com/microsoft/windows-rs/pull/3235)
- Nightly Clippy warning about assumed lifetime by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3243](https://redirect.github.com/microsoft/windows-rs/pull/3243)
- Regenerate GNU libs by
[@&#8203;riverar](https://redirect.github.com/riverar) in
[https://github.com/microsoft/windows-rs/pull/3241](https://redirect.github.com/microsoft/windows-rs/pull/3241)
- Add support for composable constructors by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3246](https://redirect.github.com/microsoft/windows-rs/pull/3246)
- Use workspace dependencies where practical by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3248](https://redirect.github.com/microsoft/windows-rs/pull/3248)
- Add test folders by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3252](https://redirect.github.com/microsoft/windows-rs/pull/3252)
- Improve interop testing by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3253](https://redirect.github.com/microsoft/windows-rs/pull/3253)
- Avoid deriving `Eq` for structs containing floating point type
parameters by [@&#8203;kennykerr](https://redirect.github.com/kennykerr)
in
[https://github.com/microsoft/windows-rs/pull/3255](https://redirect.github.com/microsoft/windows-rs/pull/3255)
- Add test for composable type authoring support by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3259](https://redirect.github.com/microsoft/windows-rs/pull/3259)
- Factory cache statics don't need to be public by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3261](https://redirect.github.com/microsoft/windows-rs/pull/3261)
- Allow `noexcept` methods in a composable hierarchy by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3262](https://redirect.github.com/microsoft/windows-rs/pull/3262)
- Group more of the WinRT tests together by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3263](https://redirect.github.com/microsoft/windows-rs/pull/3263)
- Remove "riddle" and metadata generation by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3266](https://redirect.github.com/microsoft/windows-rs/pull/3266)
- Improvements to `windows-metadata` by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3268](https://redirect.github.com/microsoft/windows-rs/pull/3268)
- We can now derive `Eq` and `PartialEq` for structs containing
callbacks by [@&#8203;kennykerr](https://redirect.github.com/kennykerr)
in
[https://github.com/microsoft/windows-rs/pull/3270](https://redirect.github.com/microsoft/windows-rs/pull/3270)
- Simpler "retval" heuristic by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3271](https://redirect.github.com/microsoft/windows-rs/pull/3271)
- Test error handling for `windows-bindgen` crate by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3272](https://redirect.github.com/microsoft/windows-rs/pull/3272)
- Exclude `web` on most workflows by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3279](https://redirect.github.com/microsoft/windows-rs/pull/3279)
- Bump serve-static and express in /web/features by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3274](https://redirect.github.com/microsoft/windows-rs/pull/3274)
- Update jsonschema requirement from 0.18 to 0.19 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/microsoft/windows-rs/pull/3283](https://redirect.github.com/microsoft/windows-rs/pull/3283)
- Move `VARIANT` support to the `windows` crate by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3282](https://redirect.github.com/microsoft/windows-rs/pull/3282)
- Update `jsonschema` dependency by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3286](https://redirect.github.com/microsoft/windows-rs/pull/3286)
- Expand `raw-dylib` testing by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3287](https://redirect.github.com/microsoft/windows-rs/pull/3287)
- Fix for `cppwinrt` concurrency issue by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3289](https://redirect.github.com/microsoft/windows-rs/pull/3289)
- Address Rust nightly compiler warnings by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3292](https://redirect.github.com/microsoft/windows-rs/pull/3292)
- Add `Deref` implementation for `HSTRING` by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3291](https://redirect.github.com/microsoft/windows-rs/pull/3291)
- Release 0.60.0 by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/microsoft/windows-rs/pull/3293](https://redirect.github.com/microsoft/windows-rs/pull/3293)

#### New Contributors

- [@&#8203;lifers](https://redirect.github.com/lifers) made their first
contribution in
[https://github.com/microsoft/windows-rs/pull/3198](https://redirect.github.com/microsoft/windows-rs/pull/3198)

**Full Changelog**:
https://github.com/microsoft/windows-rs/compare/0.59.0...0.60.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: konstin <konstin@mailbox.org>
2025-04-28 13:36:29 +02:00
konsti
b33a19689c
Optional managed Python archive download cache (#12175)
Part of #11834

Currently, all Python installation are a streaming download-and-extract.
With this PR, we add the `UV_PYTHON_CACHE_DIR` variable. When set, the
installation is split into downloading the interpreter into
`UV_PYTHON_CACHE_DIR` and extracting it there from a second step. If the
archive is already present in `UV_PYTHON_CACHE_DIR`, we skip the
download.

The feature can be used to speed up tests and CI. Locally for me, `cargo
test -p uv -- python_install` goes from 43s to 7s (1,7s in release mode)
when setting `UV_PYTHON_CACHE_DIR`. It can also be used for offline
installation of Python interpreter, by copying the archives to a
directory in the offline machine, while the path rewriting is still
performed on the target machine on installation.
2025-04-28 12:09:09 +02:00
John Mumm
4ee4a8861e
Implement RFC 7231 compliant relative URI and fragment handling in redirects (#13050)
This PR restores #13041 and integrates two PRs from @zanieb:
* #13038
* #13040

It also adds tests for relative URI and fragment handling.

Closes #13037.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-04-28 09:07:06 +02:00
Charlie Marsh
dc5b3762f3
Show tag hints when failing to find a compatible wheel in pylock.toml (#13136)
Some checks are pending
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
## 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
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)
Some checks are pending
CI / integration test | uv_build (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
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) 2025-04-25 12:57:07 -05: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)
Some checks are pending
CI / integration test | uv_build (push) Blocked by required conditions
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
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)
Some checks are pending
CI / integration test | uv_build (push) Blocked by required conditions
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
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
Charlie Marsh
a4ea814159
Avoid panic for invalid Python versions (#13077)
Some checks are pending
CI / integration test | uv_build (push) Blocked by required conditions
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
## 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)
Some checks failed
CI / integration test | uv_build (push) Has been cancelled
CI / check system | homebrew python on macos aarch64 (push) Has been cancelled
CI / check cache | ubuntu (push) Has been cancelled
CI / check cache | macos aarch64 (push) Has been cancelled
CI / check system | python on debian (push) Has been cancelled
CI / check system | python on fedora (push) Has been cancelled
CI / check system | python on ubuntu (push) Has been cancelled
CI / check system | python3.12 via chocolatey (push) Has been cancelled
CI / check system | python on opensuse (push) Has been cancelled
CI / check system | python on rocky linux 8 (push) Has been cancelled
CI / check system | python on rocky linux 9 (push) Has been cancelled
CI / check system | pypy on ubuntu (push) Has been cancelled
CI / check system | pyston (push) Has been cancelled
CI / check system | python on macos x86-64 (push) Has been cancelled
CI / check system | python3.10 on windows x86-64 (push) Has been cancelled
CI / check system | python3.10 on windows x86 (push) Has been cancelled
CI / check system | python3.13 on windows x86-64 (push) Has been cancelled
CI / check system | x86-64 python3.13 on windows aarch64 (push) Has been cancelled
CI / check system | windows registry (push) Has been cancelled
CI / check system | python3.9 via pyenv (push) Has been cancelled
CI / check system | python3.13 (push) Has been cancelled
CI / check system | conda3.11 on macos aarch64 (push) Has been cancelled
CI / check system | conda3.8 on macos aarch64 (push) Has been cancelled
CI / check system | conda3.11 on linux x86-64 (push) Has been cancelled
CI / check system | conda3.8 on linux x86-64 (push) Has been cancelled
CI / check system | conda3.11 on windows x86-64 (push) Has been cancelled
CI / check system | conda3.8 on windows x86-64 (push) Has been cancelled
CI / check system | amazonlinux (push) Has been cancelled
CI / check system | embedded python3.10 on windows x86-64 (push) Has been cancelled
CI / benchmarks (push) Has been cancelled
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)
Some checks are pending
CI / integration test | uv publish (push) Blocked by required conditions
CI / integration test | uv_build (push) Blocked by required conditions
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
Filter out the Python patch version from `pylock.toml` exports.

Fixes #13039
2025-04-22 08:43:24 +00:00
Zanie Blue
d8ad9d3cd6
Bump verison to 0.6.16 (#13042)
Includes #13041 

Also reverts https://github.com/astral-sh/uv/pull/13036
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
e2f400adbe
Bump version to 0.6.15 (#13034)
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
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
Charlie Marsh
1c3706c4ef
Infer output type in uv export (#12958)
## Summary

If the user provides a `.toml` file, we assume PEP 751; otherwise, we
assume `requirements.txt`.
2025-04-21 21:35:04 +00:00
Charlie Marsh
d8cea2fd49
Add uv export support for PEP 751 (#12955)
## Summary

This PR adds `uv export` support for [PEP
751](https://peps.python.org/pep-0751). We don't yet expose a way to
consume the generated lockfile, but it's a first step.

The logic to go from `uv.lock` to "flat set of packages to include, with
markers telling us when to include them" is all shared with the
`requirements.txt` export (and extracted in
https://github.com/astral-sh/uv/pull/12956). So most of the code is just
converting from our internal types to the PEP 751 schema.
2025-04-21 21:21:17 +00:00
Zanie Blue
9484e3663c
Prefer stable releases over pre-releases in uv python install (#12194)
e.g., `uv python install 3` should not install the 3.14 alpha

Closes #12184
2025-04-21 21:16:07 +00:00
Zanie Blue
c55dd0f295
Add a brief sleep before sending SIGINT to children (#13018)
In an attempt to avoid interrupting the child if it is in the process of
exiting.

This resolves the issue with marimo reported in
https://github.com/astral-sh/uv/issues/12108#issuecomment-2745933178 and
https://github.com/marimo-team/marimo/issues/4224
2025-04-21 14:47:39 -05:00
Zanie Blue
8717fbe469
Forward additional signals to the child process in uv run (#13017)
As I suspected quite some time ago
(https://github.com/astral-sh/uv/pull/6738#issuecomment-2315466033),
it's problematic that we don't handle _every_ signal here. This PR adds
handling for all of the Unix signals except `SIGCHLD`, `SIGIO`, and
`SIGPOLL` which seem incorrect to forward. Also notable, we _cannot_
handle `SIGKILL` so if someone sends that to the PID instead of the
PGID, they will leave dangling subprocesses.

Instead, we could use `exec` and avoid this handling. However, we'd lose
the ability to add nice error message on failure (e.g., as someone is
trying to add in https://github.com/astral-sh/uv/pull/12201) and, more
critically, we'd need to figure out how to clean up resources properly
(i.e., temporary directories) which currently happens on `Drop`. In the
long-term, we'll probably want an option to use `exec` — but we'll need
to figure out when to clean up resources or accept that they will
dangle. This was last discussed in
https://github.com/astral-sh/uv/issues/3095 — discussion on that
approach should continue there.

A note on the implementation: I spent time time trying to write the
handler using a tokio stream, so we could dynamically iterate over a
list of signals instead of copy/pasting the implementation — I couldn't
get it to work though and it didn't seem critical.

Closes https://github.com/astral-sh/uv/issues/12830
2025-04-21 14:47:30 -05:00
Jo
2cb998847c
Fix SourceNotAllowed error message (#13012)
## Summary

Before:

```console
$ uv python list py --managed-python
error: Interpreter discovery for `executable name `py`` requires `search path` but only only managed is allowed
```

After:

```console
$ uv python list py --managed-python
error: Interpreter discovery for `executable name `py`` requires `search path` but only `only managed` is allowed
```
2025-04-21 08:29:45 -04:00
konsti
da09ece8a9
Build backend: Add reference docs and schema (#12803)
Add reference documentation and schema integration for the uv build
backend. The reference documentation comes with a preview note upfront.
2025-04-21 12:27:49 +02:00
konsti
2b96dbdd49
Refactor adding bounds to dependencies in pyproject.toml (#12945)
Preparation work for making the kind of bound added configurable.

No functional changes, just moving some methods around.
2025-04-21 12:25:27 +02:00