From 08577895aece6db3b461a333f35ec8cb192fe287 Mon Sep 17 00:00:00 2001 From: Rex Ledesma Date: Wed, 1 Apr 2026 16:40:20 -0400 Subject: [PATCH] docs: add explicit example for opting package out of `--exclude-newer` (#18803) ## Summary Add the explicit configuration for opting out a package out of `--exclude-newer`. The docs mention this from https://github.com/astral-sh/uv/pull/16854, but the actual pyproject.toml configuration was missing. I found it from https://github.com/astral-sh/uv/issues/12449#issuecomment-4170155721, but this should be in the docs. ## Test Plan uv run --only-group docs mkdocs serve -f mkdocs.yml --------- Co-authored-by: Zanie Blue --- docs/concepts/resolution.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/concepts/resolution.md b/docs/concepts/resolution.md index d133e40bb..742a66a5e 100644 --- a/docs/concepts/resolution.md +++ b/docs/concepts/resolution.md @@ -721,8 +721,16 @@ Values may also be specified for specific packages, e.g., exclude-newer-package = { setuptools = "2006-12-02T02:07:43Z" } ``` -The same flag also accepts `=false` to opt a package out of the `--exclude-newer` -restriction, e.g., to allow resolving packages from an index that does not publish upload times. +The package option also accepts `=false` to opt a package out of the restriction, e.g., +`--exclude-newer-package setuptools=false`, or: + +```pyproject.toml +[tool.uv] +exclude-newer-package = { setuptools = false } +``` + +This is useful to temporarily use a newer version of package or to allow resolving a package from an +index that does not publish upload times. Package-specific values will take precedence over global values.