Commit Graph

361 Commits

Author SHA1 Message Date
luyiming 7520fe6c25 Improve documentation on virtual dependencies (#18346)
<!--
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? -->

The current documentation for virtual dependencies is somewhat confusing
because it places the sentence

> "the package will be built even if a build system is not declared"

immediately after introducing `tool.uv.package = false`. This makes it
sound as if the package might still be built when `package = false` is
set.

In reality, that sentence describes the *default behavior of path
dependencies* (when `package = false` is not set). The revised wording
clarifies that:

- `package = false` → the dependency becomes virtual (its dependencies
are installed, but the package itself is not built or installed)
- otherwise → uv treats the path dependency as a normal package and will
attempt to build it, even without a `[build-system]`.
2026-03-06 10:50:11 -06:00
Charlie Marsh 9f53c5866f Add documentation for common marker values (#18327)
Closes https://github.com/astral-sh/uv/issues/18300.
2026-03-05 21:18:01 +00:00
Zanie Blue c021be36ab Bump version to 0.10.8 (#18277) 2026-03-03 15:08:03 -06:00
Zsolt Dollenstein 08ab1a3447 Bump version to 0.10.7 (#18212) 2026-02-27 07:07:47 -05:00
Zanie Blue a91bcf2683 Bump version to 0.10.6 (#18189) 2026-02-24 17:33:36 -06:00
Zanie Blue e2c05a54e6 Bump version to 0.10.5 (#18172) 2026-02-23 16:16:32 -06:00
Zanie Blue 563c44984c Change doc heading for environment variable files (#18122)
Co-authored-by: Claude <noreply@anthropic.com>
2026-02-20 17:39:47 +00:00
Zanie Blue 7a2dc39eba Make it clear that Windows is supported in user and system level configuration docs (#18106)
Co-authored-by: Claude <noreply@anthropic.com>
2026-02-19 15:02:41 -06:00
Tomasz Kramkowski 079e3fd059 Bump version to 0.10.4 (#18072) 2026-02-17 21:15:57 +00:00
Tomasz Kramkowski c75a0c625c Bump version to 0.10.3 (#18012) 2026-02-16 10:42:51 +00:00
Tomasz Kramkowski a788db7e5d Bump version to 0.10.2 (#17958) 2026-02-10 18:21:21 +00:00
konsti b1b14d39ae Bump version to 0.10.1 (#17953) 2026-02-10 11:14:16 +00:00
Colin Marquardt efdb5847fb Suggest uv python update-shell over uv tool ... (#17941)
<!--
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? -->
Suggest `uv python update-shell` over `uv tool update-shell` since we
are in the `uv python` area here.

## Test Plan

<!-- How was it tested? -->
n/a
2026-02-09 14:01:31 +01:00
Zanie Blue 0ba432459a Bump version to 0.10.0 (#17882)
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2026-02-05 20:28:44 +00:00
Zanie Blue d2ab2d0208 Stabilize Python upgrades (#17766)
Includes a few things...

- Drops preview warnings for use of `uv python upgrade` and `uv python
install --upgrade`
- Adds `--resolve-links` to `uv python find`, which I needed in test
cases to retain existing snapshots
- Fixes issues in our "Using environment ..." messages on Windows which
were incorrect
- Refactors `from_executable` for the `PythonMinorVersionLink` type
(https://github.com/astral-sh/uv/pull/17842/commits/28b2ed2525327d94fdf5372a29bbbc476d74680f)
to use the type system to prevent incorrect construction (for above)
- Removes special casing where we only upgrade links if they already
exist, which existed so preview wasn't needed on every invocation
- Fixes a bug with `PythonMinorVersionLink::exists` which returned
`true` even if the link pointed to the wrong Python installation leading
to discovery failures
2026-02-05 11:52:18 -06:00
Zanie Blue ea4560831e Bump version to 0.9.30 (#17865) 2026-02-04 21:18:04 +00:00
Zanie Blue 1f1321d842 Bump version to 0.9.29 (#17837) 2026-02-03 13:06:01 -06:00
Zanie Blue 0e1351e400 Bump version to 0.9.28 (#17738) 2026-01-29 13:51:05 -06:00
Zanie Blue b5797b2ab4 Bump version to 0.9.27 (#17706) 2026-01-26 22:38:10 +00:00
konsti 7a3e731657 Warn about PyPy being unmaintained (#17643)
It seems that PyPy is not being actively developed anymore and is phased
out even by numpy (https://github.com/numpy/numpy/issues/30416). There's
no official statement from the project, but the numpy issue is from a
PyPy developer. I added a warning to avoid users assuming PyPy properly
supported and developed Python distribution, and in anticipation of PyPy
being eventually, slowly deprecated.

---------

Co-authored-by: Tomasz Kramkowski <tom@astral.sh>
2026-01-22 09:23:26 +00:00
Zanie Blue ee4f003628 Bump version to 0.9.26 (#17496) 2026-01-15 14:25:54 -06:00
Zanie Blue 38fcac0f36 Bump version to 0.9.25 (#17449) 2026-01-13 16:55:34 -06:00
liam 827edd0740 Allow disabling exclude-newer per package (#16854)
Resolves https://github.com/astral-sh/uv/issues/16846,
https://github.com/astral-sh/uv/issues/16813

This diff adds support for disabling `exclude-newer` for specific
packages using `<name>=false`. This allows packages
without upload dates (e.g., CPU-only PyTorch wheels from custom indices)
to be resolved when a global `exclude-newer` is set, without disabling
it globally.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-01-12 19:00:07 -06:00
Zanie Blue 0fda1525eb Bump version to 0.9.24 (#17395) 2026-01-09 22:09:11 +00:00
Zanie Blue 00f07541a1 Bump version to 0.9.23 (#17385) 2026-01-09 19:09:04 +00:00
Zanie Blue 21f76e8a2a Clarify that uv run uses inexact syncing by default (#17366)
Closes #14230

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-09 07:20:42 -06:00
konsti 82a6a66b81 Bump version to 0.9.22 (#17333)
There's a hyper-util bump to get out separate from other reqwest related
changes.
2026-01-06 11:23:12 +01:00
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
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
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
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 a63e5b62e3 Bump version to 0.9.16 (#17008) 2025-12-06 07:52:06 -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
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
Zsolt Dollenstein 05814f9cd5 Bump version to 0.9.14 (#16909) 2025-12-01 11:52:15 -05:00
Zanie Blue 735b87004c Bump version to 0.9.13 (#16862) 2025-11-26 15:12:54 +00:00
Zanie Blue 0fb1233363 Bump version to 0.9.12 (#16840) 2025-11-24 23:22:12 +00: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 4be1e0a83c Bump version to 0.9.11 (#16794) 2025-11-20 16:24:01 -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
konsti 44f5a14f40 Bump version to 0.9.10 (#16762)
Motivated by https://github.com/astral-sh/uv/pull/16759

Doesn't contain https://github.com/astral-sh/uv/pull/16752, but that one
doesn't seem critical
2025-11-17 16:29:14 +00:00