You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for developing uv—the performance and tooling experience have been fantastic.
We would appreciate some guidance on best practices regarding --exclude-newer when operating with an in-cluster pull-through cache, as well as preventing build-backend resolution during frozen CI pipelines.
Context & CI Design
Pull-Through Cache: We run an in-cluster pull-through PyPI cache (proxpi) inside our Kubernetes runner environment.
CI Philosophy:No dependency resolution should happen in CI.
We maintain a strictly version-controlled uv.lock.
All CI jobs run with UV_FROZEN: "1" and UV_EXCLUDE_NEWER: "P2D" so runners only download and install pinned artifacts directly from the internal cache without performing solver operations or querying upstream PyPI.
Project Structure: Standard PEP 621 / PEP 517 project using hatchling as the build backend ([build-system] requires = ["hatchling"]).
The Problem
While application dependencies are completely frozen by uv.lock, building the project wheel in CI triggers PEP 517 build isolation. This introduces an unexpected dynamic resolution step for build-system.requires (hatchling).
Because proxpi is a lightweight caching proxy, its simple index responses do not forward or store release upload timestamps. As a result, uv emits warnings for every candidate version and then fails:
warning: hatchling-1.32.0.tar.gz is missing an upload date, but user provided: 2026-09-01T18:02:59.443957116Z
warning: hatchling-1.32.0-py3-none-any.whl is missing an upload date, but user provided: 2026-09-01T18:02:59.443957116Z
...
warning: hatchling-0.8.0-py2.py3-none-any.whl is missing an upload date, but user provided: 2026-09-01T18:02:59.443957116Z
× Failed to build `myproject @ file:///workspace/...`
├─▶ Failed to resolve requirements from `build-system.requires`
├─▶ No solution found when resolving: `hatchling`
╰─▶ Because there are no versions of hatchling and you require hatchling, we
can conclude that your requirements are unsatisfiable.
hint: `hatchling` was filtered by `exclude-newer` to only include packages uploaded before 2026-09-01T18:02:59.576541647Z.
Why this happens
proxpi lacks upload timestamps, so uv assigns the fallback cutoff date (2026-09-01T...) to all hatchling versions.
Under exclude-newer (which excludes releases uploaded at or after the cutoff), every candidate version is filtered out, causing the build to fail.
Questions / Guidance Requested
Fully Locking Build Backends: Since our goal is zero resolution in CI, is there a recommended way to lock build-system.requires (e.g. hatchling) in uv.lock alongside application dependencies so that building the wheel is completely deterministic and requires no index resolution?
Handling Simple Caches under exclude-newer: When using lightweight caching proxies like proxpi that lack timestamp metadata, is there a recommended way to allow uv to accept cached packages without completely disabling exclude-newer globally maybe by not doing any rolution at all?
As you've discovered, UV_FROZEN doesn't (yet) freeze isolated build requirements. That's tracked in #5190.
One option today is to put build dependencies into a dependency group, add them to the lockfile, then in CI sync them explicitly and disable build isolation. This ticks off the no-resolution-in-CI requirement.
If you're OK with just build dependency pinning, after #21411 lands (hopefully very soon, I'm actively working on it) you'll be able to put exact pins and hashes in build-constraint-dependencies, enable require-build-hashes = true, and carry on using normal isolated builds. No dependency group shenanigans, but resolution still runs for the build dependencies, applying for example exclude-newer.
For the exclude-newer bit, uv always rejects files with unknown upload times - the error message prints the cutoff date, it's not evidence of assigning the cutoff date to hatchling versions. The optimal solution (in my admittedly privileged opinion 😄) is to add upload timestamp support to proxpi, but you could work around this locally by disabling exclude-newer for the proxy index like so.
Why would the resultion still run for pinned build dependencies when UV_FROZNE=1.
Setting an index spcific overwrite would not work. That is inserted by the build enviroment dynamically. I could make it propably static but I like the dynamic way of the current setup.
Activity
zsol commentedon Sep 4, 2026
As you've discovered,
UV_FROZENdoesn't (yet) freeze isolated build requirements. That's tracked in #5190.One option today is to put build dependencies into a dependency group, add them to the lockfile, then in CI sync them explicitly and disable build isolation. This ticks off the no-resolution-in-CI requirement.
If you're OK with just build dependency pinning, after #21411 lands (hopefully very soon, I'm actively working on it) you'll be able to put exact pins and hashes in
build-constraint-dependencies, enablerequire-build-hashes = true, and carry on using normal isolated builds. No dependency group shenanigans, but resolution still runs for the build dependencies, applying for exampleexclude-newer.For the exclude-newer bit, uv always rejects files with unknown upload times - the error message prints the cutoff date, it's not evidence of assigning the cutoff date to
hatchlingversions. The optimal solution (in my admittedly privileged opinion 😄) is to add upload timestamp support toproxpi, but you could work around this locally by disablingexclude-newerfor the proxy index like so.philipp-horstenkamp commentedon Sep 4, 2026
I am looking forward to #21411.
Why would the resultion still run for pinned build dependencies when
UV_FROZNE=1.Setting an index spcific overwrite would not work. That is inserted by the build enviroment dynamically. I could make it propably static but I like the dynamic way of the current setup.
Could
work?
Regards and thanks for the answer!