Commit Graph

1253 Commits

Author SHA1 Message Date
renovate[bot]
0d1ee355ca Update documentation references to actions/checkout to v6 (#17306)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-02 13:19:17 -05:00
renovate[bot]
e3687b5b68 Update documentation references to actions/cache to v5 (#17305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-02 13:18:59 -05:00
Sofie Van Landeghem
d0088c1914 Clarify requirements file format in docs (#17284)
Co-authored-by: William Woodruff <william@yossarian.net>
2026-01-02 11:40:10 -05:00
Zanie Blue
0dc9556adb Bump version to 0.9.21 (#17270) 2025-12-30 15:46:08 +00:00
William Woodruff
53cc00eab5 Fix a small typo in the resolution docs (#17258) 2025-12-29 19:06:41 -05:00
Charlie Marsh
765a967236 Bump version to 0.9.20 (#17256)
## Summary

In #17254, I failed to bump the versions of the various internal crates,
so need to re-release.
2025-12-29 20:13:57 +00:00
Charlie Marsh
a45f502e3a Bump version to 0.9.19 (#17254)
Closes https://github.com/astral-sh/uv/issues/17240
2025-12-29 13:41:40 -05:00
shamil777
543f1f3f59 Improve wording in Concepts/Projects/Creating projects documentation (#17242)
## Summary

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

---------

Co-authored-by: Tomasz Kramkowski <tom@astral.sh>
2025-12-19 14:07:39 +00:00
Zanie Blue
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
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
ed37f3b432 Drop arm musl caveat from Docker documentation (#17111)
This works fine now

```
❯ docker run --rm -it ghcr.io/astral-sh/uv:alpine sh -c "uv python install 3.14"
Installed Python 3.14.2 in 2.77s
 + cpython-3.14.2-linux-aarch64-musl (python3.14)
```
2025-12-12 19:15:15 +00:00
Charlie Marsh
4c1571fb76 Fix version reference in resolver example (#17085) 2025-12-11 15:53:48 +01:00
Zanie Blue
2b5d65e61d Bump version to 0.9.17 (#17058) 2025-12-09 16:36:00 -06:00
konsti
8d2c2e8cdf Better source-exclude reference docs (#16832)
Fixed https://github.com/astral-sh/uv/issues/16821

This is already explained in the guide, but it was missing from the
reference docs.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-12-09 21:14:28 +00:00
Niko Pikall
b6686fbce3 Update UV_VERSION in docs for GitLab CI/CD (#17040)
<!--
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
Update the `UV_VERSION`, such that a `copy-to-clipboard` action and
pasting into a `.gitlab-ci.yml` is not 4 minor versions behind, as it
happened to me a couple of times.

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

## Test Plan
I ran `mkdocs serve` and it worked (I literally only changed one
character)
<!-- How was it tested? -->
2025-12-09 14:56:27 -06:00
Zanie Blue
d0a6f5d13f Add support for relative durations in exclude-newer (#16814)
Adds support for "friendly" durations like, 1 week, 7 days, 24 hours
using Jiff's parser. During resolution, we calculate this relative to
the current time and resolve it into a concrete timestamp for the
lockfile. If the span has not changed, e.g., to another relative value,
then locking again will not change the lockfile. The locked timestamp
will only be updated when the lockfile is invalidated, e.g., with
`--upgrade`. This prevents the lockfile from repeatedly churning when a
relative value is used.
2025-12-09 19:52:14 +00:00
Zanie Blue
7b6b02a7d1 Recommend UV_NO_DEV in Docker installs (#17030)
Closes https://github.com/astral-sh/uv/issues/17027

See also, https://github.com/astral-sh/uv-docker-example/pull/73
2025-12-09 12:12:08 -06:00
Zanie Blue
5a6f2ea319 Generate reference documentation at publish-time and the JSON schema at release-time (#16969)
It'd be nice to avoid churn for contributors. This is a pretty frequent
cause of CI failures and I don't think we really need to have the
reference documentation committed.
2025-12-08 12:31:38 +00:00
Zanie Blue
a63e5b62e3 Bump version to 0.9.16 (#17008) 2025-12-06 07:52:06 -06:00
Zanie Blue
8390b311f8 Update the versioning policy to retain the minor breaking scheme indefinitely (#16710) 2025-12-05 09:05:46 -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
Oshadha Gunawardena
2abe56a357 Clarify --project flag help text to indicate project discovery (#16965)
Clarify `--project` flag help text to indicate project discovery

  Update the help text for `--project` from "Run the command within
  the given project directory" to "Discover a project in the given
  directory" to better reflect its actual behavior.

  The `--project` flag affects file discovery (pyproject.toml, uv.toml,
  etc.) but does not change the working directory. Users should use
  `--directory` for changing the working directory.

  Fixes #16718
2025-12-03 12:15:36 -06:00
Matthijs Kok
539b7368cd Update Docker integration guide to prefer COPY over ADD for simple cases (#16883)
## Summary

Docker best practices recommend to use `COPY` when the additional
functionality of `ADD` is not used.

See:
- https://docs.docker.com/build/building/best-practices/#add-or-copy
-
https://www.docker.com/blog/docker-best-practices-understanding-the-differences-between-add-and-copy-instructions-in-dockerfiles/

## Test Plan

Docs only change
2025-12-03 15:16:42 +00:00
Charlie Marsh
99660a8574 Upgrade PyTorch documentation to latest versions (#16970)
## Summary

Point to PyTorch 2.9, Python 3.14, CUDA 12.8, etc.
2025-12-03 07:01:49 -08:00
Matthew Woolf
20ab80ad8f Update pytorch.md to include information about supporting CUDA 13.0.x (#16957)
## Summary

This change updates the guide about integration with pytorch to include
the CUDA 13.0 variant.

## Test Plan

I generated the documentation and verified that it looked correct.
2025-12-03 06:47:57 -08:00
Charlie Marsh
49b70e7225 Support --target and --prefix in uv pip list, uv pip freeze, and uv pip show (#16955)
## Summary

Closes https://github.com/astral-sh/uv/issues/15112.
2025-12-03 06:49:11 -06: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
Charlie Marsh
eb65f9ff74 Add UV_HIDE_BUILD_OUTPUT to omit build logs (#16885)
## Summary

Closes #16804.
2025-12-02 16:43:01 -08:00
Zanie Blue
e7af5838bb Bump version to 0.9.15 (#16942) 2025-12-02 17:48:28 -06:00
samypr100
fee7f9d093 Support Git LFS with opt-in (#16143)
## Summary

Follow up to https://github.com/astral-sh/uv/pull/15563
Closes https://github.com/astral-sh/uv/issues/13485

This is a first-pass at adding support for conditional support for Git
LFS between git sources, initial feedback welcome.

e.g.
```
[tool.uv.sources]
test-lfs-repo = { git = "https://github.com/zanieb/test-lfs-repo.git", lfs = true }
```

For context previously a user had to set `UV_GIT_LFS` to have uv fetch
lfs objects on git sources. This env var was all or nothing, meaning you
must always have it set to get consistent behavior and it applied to all
git sources. If you fetched lfs objects at a revision and then turned
off lfs (or vice versa), the git db, corresponding checkout lfs
artifacts would not be updated properly. Similarly, when git source
distributions were built, there would be no distinction between sources
with lfs and without lfs. Hence, it could corrupt the git, sdist, and
archive caches.

In order to support some sources being LFS enabled and other not, this
PR adds a stateful layer roughly similar to how `subdirectory` works but
for `lfs` since the git database, the checkouts and the corresponding
caching layers needed to be LFS aware (requested vs installed). The
caches also had to isolated and treated entirely separate when handling
LFS sources.

Summary
* Adds `lfs = true` or `lfs = false` to git sources in pyproject.toml
* Added `lfs=true` query param / fragments to most relevant url structs
(not parsed as user input)
  * In the case of uv add / uv tool, `--lfs` is supported instead
* `UV_GIT_LFS` environment variable support is still functional for
non-project entrypoints (e.g. uv pip)
* `direct-url.json` now has an custom `git_lfs` entry under VcsInfo
(note, this is not in the spec currently -- see caveats).
* git database and checkouts have an different cache key as the sources
should be treated effectively different for the same rev.
* sdists cache also differ in the cache key of a built distribution if
it was built using LFS enabled revisions to distinguish between non-LFS
same revisions. This ensures the strong assumption for archive-v0 that
an unpacked revision "doesn't change sources" stays valid.

Caveats
* `pylock.toml` import support has not been added via git_lfs=true,
going through the spec it wasn't clear to me it's something we'd support
outside of the env var (for now).
* direct-url struct was modified by adding a non-standard `git_lfs`
field under VcsInfo which may be undersirable although the PEP 610 does
say `Additional fields that would be necessary to support such VCS
SHOULD be prefixed with the VCS command name` which could be interpret
this change as ok.
* There will be a slight lockfile and cache churn for users that use
`UV_GIT_LFS` as all git lockfile entries will get a `lfs=true` fragment.
The cache version does not need an update, but LFS sources will get
their own namespace under git-v0 and sdist-v9/git hence a cache-miss
will occur once but this can be sufficient to label this as breaking for
workflows always setting `UV_GIT_LFS`.

## Test Plan

Some initial tests were added. More tests likely to follow as we reach
consensus on a final approach.

For IT test, we may want to move to use a repo under astral namespace in
order to test lfs functionality.

Manual testing was done for common pathological cases like killing LFS
fetch mid-way, uninstalling LFS after installing an sdist with it and
reinstalling, fetching LFS artifacts in different commits, etc.

PSA: Please ignore the docker build failures as its related to depot
OIDC issues.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: konstin <konstin@mailbox.org>
2025-12-02 12:23:51 +00:00
Charlie Marsh
2cdbf9e547 Add ROCm 6.4 to --torch-backend=auto (#16919)
## Summary

Closes https://github.com/astral-sh/uv/issues/16917.
2025-12-01 20:27:20 -05:00
Zsolt Dollenstein
05814f9cd5 Bump version to 0.9.14 (#16909) 2025-12-01 11:52:15 -05:00
Charlie Marsh
0ae54dbd8a Use UV_WORKING_DIR for consistency (#16884)
## Summary

Closes https://github.com/astral-sh/uv/issues/16870.
2025-11-30 15:59:05 +00:00
my1e5
7ca92dcf66 Bump setup-uv action to v7 in docs (#16858)
## Summary

Bumps the setup-uv action to v7 in the GitHub Actions integration docs.

## Test Plan

Built the documentation.
2025-11-26 16:15:02 +01:00
Zanie Blue
735b87004c Bump version to 0.9.13 (#16862) 2025-11-26 15:12:54 +00:00
Zanie Blue
0fb1233363 Bump version to 0.9.12 (#16840) 2025-11-24 23:22:12 +00:00
William Woodruff
7b3199f07c Collect and upload PEP 740 attestations during uv publish (#16731)
Co-authored-by: konsti <konstin@mailbox.org>
2025-11-24 16:47:15 -05:00
Zanie Blue
4b92f4fde4 Move the "Export" guide to the projects concept section (#16835)
I consider this a bit too advanced to be in the top-level guides
2025-11-24 10:39:52 -06:00
Zanie Blue
666059bd88 Add documentation for intermediate Docker layers in a workspace (#16787) 2025-11-24 15:22:27 +00:00
Zanie Blue
d3a9455998 Update the cargo install recommendation to use crates (#16800) 2025-11-20 20:05:46 -06:00
Zanie Blue
4be1e0a83c Bump version to 0.9.11 (#16794) 2025-11-20 16:24:01 -06:00
Zanie Blue
dfe89047bb Publish to crates.io (#16770) 2025-11-20 21:26:44 +00:00
Zanie Blue
5eda329e5a Improve note about build system in publish guide (#16788)
Addresses
https://github.com/astral-sh/uv/issues/5605#issuecomment-3549958048
2025-11-20 13:59:59 -06:00
Zanie Blue
75bd2ea0c5 Move do not upload publish note out of the guide into concepts (#16789)
This feels a little out of place here and it seems nice to be able to
link to it.
2025-11-20 12:33:15 -06:00
Tom Schafer
fd7e6d0a05 Add SBOM export support (#16523)
Co-authored-by: Will Rollason <william.rollason@snyk.io>
2025-11-20 12:52:31 -05:00
pythonweb2
7d8634bf35 Document the new behavior for free-threaded python versions (#16781)
## Summary

I noticed that after first installing the free-threaded version, then
the gil version of 3.14, I wasn't able
to install greenlet, because it doesn't ship with wheels for the
free-threaded version (I think it isn't
safe for it to use that interpreter). I noticed that the change made in
3.14 wasn't updated in the docs.

## Test Plan

N/A

---------

Co-authored-by: Wade Roberts <wade.roberts@centralsquare.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-11-20 08:58:49 -06:00
Zanie Blue
3ac43e8d15 Disable always-authenticate when running under Dependabot (#16773)
Dependabot appears to run a proxy which intercepts all requests and adds
credentials — credentials are _not_ provided via the CLI or environment
variables and there's no way for a user to do so. This means that when
`authenticate = "always"` is used (or when the index URL is on a pyx
domain), uv will fail even though Dependabot may intercept the request
and add credentials.

See
https://github.com/dependabot/dependabot-core/#private-registry-credential-management
2025-11-18 15:43:44 -06:00
Zanie Blue
cda7fc3fda Revert "Fix CMD path in FastAPI Dockerfile (#16701)" (#16752)
This reverts commit 92230ba679 from #16701

See https://github.com/astral-sh/uv/pull/16701#issuecomment-3538541379
2025-11-17 13:17:27 -06:00