Commit Graph

5849 Commits

Author SHA1 Message Date
Charlie Marsh bd6cc12a4f Remove test infra 2025-11-11 21:35:32 -05:00
Charlie Marsh 4e25397b04 Revert 2025-11-11 21:20:25 -05:00
Charlie Marsh f2513e4f8f Remove test infra 2025-11-11 21:19:20 -05:00
Charlie Marsh 36a8b04d34 Remove subdirectory support 2025-11-11 21:18:37 -05:00
Charlie Marsh ed48a81fa7 Use a stable cache key 2025-11-11 20:59:32 -05:00
Charlie Marsh 203594d482 Resolve commits 2025-11-11 20:59:32 -05:00
Charlie Marsh ba8284379c Refactor 2025-11-11 20:59:32 -05:00
Charlie Marsh 5339c83998 This is not erroring 2025-11-11 20:59:32 -05:00
Charlie Marsh bbb49ef912 Sketch out methods 2025-11-11 20:59:32 -05:00
Charlie Marsh 6570975777 Misc. changes to wire up Git cache 2025-11-11 20:59:32 -05:00
Mikayla Thompson f22af0f88a
Deprecate `--project` arg for init (#16674)
Addresses https://github.com/astral-sh/uv/issues/15790

## Summary

After discussion, the functionality of `--project` vs `--directory` was
quite unclear in this case, so deprecating `--project` for `init` is
probably the clearest behavior option. This is a breaking change, so it
requires being under preview before being rolled out fully.

Included in the PR now:
- new feature flag (`init --project` is deprecated if `--preview` or
`--preview-features deprecate-project-for-init` are provided)
- tests (for `--directory` behavior, as well as the current warning and
future error)
- documentation updated in docs/concepts/projects/init.md

---------

Signed-off-by: Mikayla Thompson <mrt@mikayla.codes>
2025-11-10 16:33:08 -07:00
Mathieu Kniewallner 9a21897f3d
feat(cli): expose `UV_NO_DEFAULT_GROUPS` environment variable (#16645)
<!--
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

Similarly to #16529 that adds `UV_NO_GROUP`, this adds
`UV_NO_DEFAULT_GROUPS` that does the same as `--no-default-groups`. This
can be useful on the CI, to disable default groups on a job without
having to set the argument in all commands that could trigger a sync
(for instance
[here](8757b318e9/.github/workflows/main.yml (L105-L116))).

## Test Plan

Snapshot tests.

---------

Co-authored-by: samypr100 <3933065+samypr100@users.noreply.github.com>
2025-11-10 14:43:48 -06:00
Charlie Marsh c1c1950dce
Add support for the Simple index API top-level route (#16656)
## Summary

At present, we only have support for the detail routes (e.g.,
`https://pypi.org/simple/requests`), but not the top-level index route
(e.g., `https://pypi.org/simple/`). I need this for some downstream work
so pulling it into its own PR.
2025-11-10 14:50:19 -05:00
Charlie Marsh ce4a47a2e0
Remove `torch-model-archiver` and `torch-tb-profiler` from PyTorch backend (#16655)
## Summary

These are present on the PyTorch index, but only at very old versions.
The PyPI versions are newer, and seemingly these don't need to be built
against CUDA, etc.

Closes https://github.com/astral-sh/uv/issues/16651.
2025-11-10 10:26:12 -05:00
Zanie Blue 60196bc3ce
Remove stale comment (#16667)
This happens in `from_settings` instead
2025-11-10 14:55:04 +00:00
liam c826f2b042
Fix pixi environment detection by recognizing Conda prefixes with `conda-meta/pixi` (#16585)
Resolves https://github.com/astral-sh/uv/issues/16295

This PR updates the Conda base-environment heuristic to recognize
Pixi-managed environments by checking for the `conda-meta/pixi` marker
file. Pixi default environments now resolve as isolated child
environments instead of system installations, restoring the expected uv
pip behavior without the `--system` flag.
2025-11-09 22:16:17 -06:00
Zanie Blue 2d9fe7ca70
Pin lock futures (#16643)
These futures are quite large (~16,000 bytes) and adding new fields to
the `ResolverOptions` in another pull request caused a lint error from
Clippy.
2025-11-09 10:37:16 -06:00
Pavel Logan Dikov caf49f845f
Use `.rcdata` to store trampoline type + path to python binary (#15068)
`.rsrc` is the idiomatic way of storing metadata and non-code resources
in PE
binaries. This should make the resulting binaries more robust as they
are no longer
dependent on the exact location of a certain magic number.

Addresses: #15022

## Test Plan

Existing integration test for `uv-trampoline-builder` + addition to
ensure robustness
to code signing.

---------

Co-authored-by: samypr100 <3933065+samypr100@users.noreply.github.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-11-09 08:12:40 -06:00
github-actions[bot] 1b7faafd7a
Sync latest Python releases (#16505)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-11-08 10:16:21 -06:00
Zanie Blue 5983a8876b
Refactor to remove some cruft from `ExcludeNewer` propagation (#16641)
I think using a wire here is less convoluted.
2025-11-08 09:44:17 -06:00
Zanie Blue 85c5d32284
Bump version to 0.9.8 (#16636) 2025-11-07 11:45:22 -06:00
Zanie Blue bfecc9902e
Fix inclusive constraints on available package versions in resolver errors (#16629)
Closes https://github.com/astral-sh/uv/issues/16626
2025-11-07 09:23:37 -06:00
Zanie Blue 5e181d36ef
Show help on `uv build -h` (#16632) 2025-11-07 16:19:40 +01:00
Charlie Marsh 4740d267e9
Remove fast path from `uv-git` fetch (#16607)
## Summary

Now that we perform this fast-path in
`crates/uv-distribution/src/source/mod.rs`, I _think_ the fast-path here
is no longer used? In my testing, we only actually took this path when
the fast-path _already_ failed (and thus it would fail again, wasting
time).
2025-11-06 22:18:05 -06:00
Haaris Rahman e5c10cd45d
Fix typo in uv tool list doc (#16625)
<!--
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


Fixed a typo in the docs.

Regenerated the docs, with the fix.


<!-- What's the purpose of the change? What does it do, and why? -->
2025-11-06 22:06:17 -06:00
Charlie Marsh 5fe8af114b
Accept multiple packages in `uv export` (#16603)
## Summary

Closes https://github.com/astral-sh/uv/issues/16503.
2025-11-05 22:52:22 +00:00
konsti 148b694b6b
Make `augment_requirement` a method (#16592)
Fixing the pattern so we can be consistent in
https://github.com/astral-sh/uv/pull/16143#discussion_r2479028440
2025-11-04 19:53:59 +01:00
Charlie Marsh 9a6eafc043
Accept multiple packages in `uv sync` (#16543)
## Summary

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

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: konsti <konstin@mailbox.org>
2025-11-04 14:17:58 +00:00
Zanie Blue 60a811e715
Allow Python requests to include `+gil` to require a GIL-enabled interpreter (#16537)
Addresses
https://github.com/astral-sh/uv/pull/16142#issuecomment-3390586957

Nobody seems to have a good idea about how to spell this. "not
free-threaded" would be the most technically correct, but I think "gil"
will be more intuitive.
2025-11-03 13:35:52 -06:00
Les Freire 86e7b2e97a
Fix missing value_type for `default-groups` in schema (#16575)
## Summary

Fix incomplete value_type attribute for default-groups field in the
ToolUv struct schema definition. The value_type was missing its value,
which should be str | list[str] to reflect that default-groups can
accept either the literal "all" or a list of group names. (#16574)
2025-11-03 08:55:20 -05:00
renovate[bot] e5cb2ee01b
Update Rust crate tikv-jemallocator to v0.6.1 (#16567) 2025-11-02 21:07:49 -05:00
liam 77fecc5c27
Improve `uv init` error for invalid directory names (#16554)
Resolves https://github.com/astral-sh/uv/issues/16433

When `uv init` infers a project name from the working directory,
directories with characters outside the PEP 503 rules produced the
generic “Not a valid package or extra name” message that didn’t explain
the source of the problem. This change intercepts that failure, reports
whether the current or explicit target directory caused it, and tells
the user to supply an explicit `--name`.
2025-11-02 19:26:09 -05:00
Michael Richter 485503ee65
Remove fs2 dependency and update Rust to 1.89 (#15764)
<!--
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 PR removes the crate fs2 and updates Rust version to 1.89.

*Why?*

Crate fs2 is unmaintained for a long time now and has unfixed issues.
Especially it doesn't build on AIX, which is the reason I started fixing
it.

*How?*

I removed fs2 and replaced it by std:fs:File methods.

## Test Plan

<!-- How was it tested? -->
- I built it on Windows and AIX only.
- I did not test the artifacts.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-11-02 16:33:53 -05:00
Charlie Marsh 6da135a66a
Respect multi-GPU outputs in nvidia-smi (#15460)
## Summary

This initially included `NVIDIA_VISIBLE_DEVICES` masking, though it's
now omitted for simplicity.

Closes https://github.com/astral-sh/uv/issues/14647.
2025-11-02 21:21:44 +00:00
chisato 8b479efd2f
Add a `uv cache size` command (#16032)
## Summary

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

Implement `uv cache size` to output the cache directory size in raw
bytes by default, with a `--human` option for human-readable output.

close #15821

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

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-11-02 20:44:28 +00:00
Blair Allan 4b61e65d6c
Add `UV_NO_SOURCES` as an environment variable (#15883)
## Summary

This is an enhancement that makes the cli flag `--no-sources` an
environment variable - "UV_NO_SOURCES"

Why is this a relevant change? 

When working across different environments, in our case remote vs local,
we often have our packages hosted in a artifact registry but when
developing locally we build our packages from github. This results in us
using the uv.tool.sources table quite a bit however this then also
forces us to use `--no-sources` for all our remote work.

This change enables us to set an environment variable once and to never
have to type --no-sources after every uv run command again.

## Test Plan

Expanded on the current --no-sources tests, to test when
UV_NO_SOURCES=true/false the behaviour is the same as the flag.
Additionally ensured that the cli overrides the env variable.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-11-02 20:25:19 +00:00
konsti 944ff6c685
Log most recently modified file for cache-keys (#16338)
For https://github.com/astral-sh/uv/issues/16336. We previously weren't
telling the user which file is responsible for rebuilding.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-11-02 18:52:07 +00:00
liam 857827da14
Add prerelease guidance for build-system resolution failures (#16550)
Resolves https://github.com/astral-sh/uv/issues/16496

This PR updates the resolver so `build-system` dependency failures
surface prerelease hints even when prerelease selection is fixed. When a
build dependency only has prerelease candidates, or the requested
version explicitly includes a prerelease marker, we now emit a tailored
hint explaining that build environments can’t auto-enable prereleases
and describing how to opt in.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-11-02 18:38:09 +00:00
Christian Asch 2784856e10
Allow for unnormalized names in the `METADATA` file (#16547) (#16548)
## Summary

Deserialize project name into both a String and a ProjectName, this way
we can keep using the normalized name elsewhere while respecting the
original name from the `pyproject.toml` file

This PR addresses issue #16547

## Test Plan

I added a new test for this, and I ran the test suite in the
`metadata.rs` file.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-11-01 21:58:49 +00:00
Zanie Blue 101d0e2892
Allow `--check` and `--locked` to be used together in `uv lock` (#16538)
See https://github.com/astral-sh/uv/issues/16517#issuecomment-3473747461
2025-10-31 13:11:34 -05:00
Zanie Blue 1e2ec4a50c
Include the Python variant suffix in "Using Python ..." messages (#16536)
See https://github.com/astral-sh/uv/issues/16253#issuecomment-3393383573
2025-10-31 13:11:25 -05:00
Charlie Marsh 82aa0d0ef5
Avoid pluralizing 'retry' for single value (#16535) 2025-10-31 10:28:51 -04:00
Charlie Marsh 5c71b5c124
Enable first-class dependency exclusions (#16528)
## Summary

This PR adds an `exclude-dependencies` setting that allows users to omit
a dependency during resolution. It's effectively a formalized version of
the `flask ; python_version < '0'` hack that we've suggested to users in
various issues.

Closes #12616.
2025-10-31 10:14:12 -04:00
samypr100 7978122837
Update Rust toolchain to 1.91 and MSRV to 1.89 (#16531)
## Summary

Updates Rust Toolchain to
[1.91](https://blog.rust-lang.org/2025/10/30/Rust-1.91.0/) and bumps
MSRV to [1.89](https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/) per
versioning policy. New clippy rule [implicit
clone](https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone)
resulted in some minor changes (some with improvements).

Updates trampoline to `nightly-2025-06-23` which is roughly 1.89~. The
trampoline binaries do not need to be regenerated as there should be no
changes.
2025-10-30 22:34:59 -05:00
Charlie Marsh 7cf1646a44
Expose `UV_NO_GROUP` as an environment variable (#16529)
## Summary

Closes https://github.com/astral-sh/uv/issues/11619.
2025-10-30 22:34:14 -05:00
Zanie Blue 0adb444806
Bump version to 0.9.7 (#16524) 2025-10-30 16:47:51 -05:00
Zanie Blue 97341c6910
Drop terminal coloring from `uv auth token` output (#16504)
It's too common to set `FORCE_COLOR` in CI which then breaks consumption
of the token.

This is actually specific to `pyx.dev`, as we print passwords without
coloring.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-10-30 20:10:05 +00:00
Alexander Vandenbulcke c156b1d50d
Don't use `UV_LOCKED` to enable `--check` flag (#16521)
Env var UV_LOCKED should only be used to enable `--locked` for the `uv
lock` command. Previously `--check` was also enabled by specifying
UV_LOCKED.
2025-10-30 15:37:27 -04:00
Zanie Blue a1610c794e
Add Windows x86-32 emulation support to interpreter architecture checks (#13475)
Closes https://github.com/astral-sh/uv/issues/13471

Refactors the logic there a bit too.

---------

Co-authored-by: Aria Desires <aria.desires@gmail.com>
2025-10-30 10:50:26 -04:00
Clemens Brunner c7aaa8b7ef
Improve readability of progress bars (#16509)
<!--
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 readability of progress bars by drawing the right portions in
dimmed black instead of dimmed green. This makes it much easier to
distinguish from the left (finished) part, which is drawn in green.

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

## Test Plan

Tested locally, looks as follows:

<img width="1100" height="731" alt="white"
src="https://github.com/user-attachments/assets/2a396e96-27ef-41ed-8b03-a0de2061af12"
/>
<img width="1100" height="731" alt="black"
src="https://github.com/user-attachments/assets/85d03a3a-a1dc-4389-9e51-fd486e60e067"
/>
2025-10-30 14:16:28 +00:00