The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(deps): exempt no-upload-date and exact-pinned packages from exclude-newer bricking
Tekniumbc36d7d6c84f
diff --git a/pyproject.toml b/pyproject.tomlindex 8278ebb6b80..476010d3f5e 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -386,7 +386,27 @@ exclude-newer = "14 days"# request-smuggling) fix in 4.4.1, published 2026-08-03. Remove after 2026-08-17.# aiohttp, cryptography: same shape — the advisory fixes are newer than the# 14-day window, so the resolver cannot see them without an exception.-exclude-newer-package = { vercel = false, nemo-relay = false, huggingface_hub = false, h2 = false, aiohttp = false, cryptography = false }+#+# defusedxml, python-olm, unpaddedbase64: the OPPOSITE shape (#80387, #79434,+# #78227 family). These are ancient, effectively frozen releases (2021-2023)+# whose upload dates are frequently absent from mirror indexes and stale uv+# HTTP caches. uv treats a missing upload date as "newer than the cutoff" and+# excludes the package, bricking [youtube]/[wecom]/[matrix] resolution+# ("there are no versions of defusedxml"). Exempting them carries zero aging+# risk — their newest releases are years old — and unbricks resolvers that+# cannot see upload dates.+#+# setuptools, pillow, mcp: exact-pinned bricks (#78227, #75992, #76020). uv+# applies exclude-newer to build-system.requires and core deps too; when a+# resolver cannot see an upload date (old uv, mirror index, stale HTTP cache)+# it filters the pinned version and the package cannot even BUILD+# ("No solution found when resolving: setuptools==83.0.0"). These deps are+# exact-pinned (==X.Y.Z), so exclude-newer adds zero float protection for+# them — the version cannot move without a reviewed pin bump — while the+# cutoff can still brick installs. Exempting exact pins is pure brick-risk+# removal at no supply-chain cost. Guarded by+# tests/test_packaging_metadata.py::test_build_system_requires_exempt_from_exclude_newer.+exclude-newer-package = { vercel = false, nemo-relay = false, huggingface_hub = false, h2 = false, aiohttp = false, cryptography = false, defusedxml = false, python-olm = false, unpaddedbase64 = false, setuptools = false, pillow = false, mcp = false }[tool.setuptools]# Top-level single-file modules (not packages). Without this, uv2nix'sdiff --git a/scripts/install.sh b/scripts/install.shindex dbf364a4243..041bce87589 100755--- a/scripts/install.sh+++ b/scripts/install.sh@@ -1700,7 +1700,7 @@ PYexit 1fi- if [ "$_tier_name" != "all (with RL/matrix extras)" ]; then+ if [ "$_tier_name" != "all" ]; thenlog_warn "Note: installed via fallback tier ($_tier_name)."log_info "Some optional features may be missing. After resolving any"log_info "PyPI/network issue, re-run: $UV_CMD pip install -e '.[all]'"diff --git a/tests/test_packaging_metadata.py b/tests/test_packaging_metadata.pyindex 741f6e56e5f..7580c91e1fc 100644--- a/tests/test_packaging_metadata.py+++ b/tests/test_packaging_metadata.py@@ -248,6 +248,44 @@ def test_pyproject_pins_are_internally_consistent():)+def test_build_system_requires_exempt_from_exclude_newer():+ """Regression guard for the #78227 / #75992 exclude-newer brick class.++ ``[tool.uv].exclude-newer`` applies to ``[build-system].requires`` too.+ When a resolver cannot see a package's upload date (old uv, mirror+ index, stale HTTP cache) it treats the release as newer than the cutoff+ and filters it — and because build requirements are exact-pinned there+ is no older candidate to fall back to, so the project cannot even be+ BUILT from a git checkout ("No solution found when resolving:+ setuptools==83.0.0", observed on released v0.20.0).++ Exempting an exact-pinned build requirement costs nothing: the version+ cannot move without a reviewed pin bump, so exclude-newer adds no float+ protection for it. Every build requirement must therefore appear in the+ ``exclude-newer-package`` whitelist (set to ``false``) for as long as a+ relative ``exclude-newer`` cutoff is configured.+ """+ data = tomllib.loads((REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8"))+ uv_cfg = data.get("tool", {}).get("uv", {})+ if "exclude-newer" not in uv_cfg:+ pytest.skip("no exclude-newer cutoff configured — nothing to exempt")+ whitelist = {+ _canonical(name)+ for name, enabled in uv_cfg.get("exclude-newer-package", {}).items()+ if enabled is False+ }+ build_requires = {+ _canonical(_distribution_name(req))+ for req in data.get("build-system", {}).get("requires", [])+ }+ missing = sorted(build_requires - whitelist)+ assert not missing, (+ "build-system.requires packages are subject to the exclude-newer "+ "cutoff but missing from the [tool.uv].exclude-newer-package "+ f"whitelist — fresh builds brick when upload dates are invisible: {missing}"+ )++def _lazy_deps_by_feature():diff --git a/uv.lock b/uv.lockindex eb519d44a07..f4b3c90ce06 100644--- a/uv.lock+++ b/uv.lock@@ -12,12 +12,18 @@ exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included forexclude-newer-span = "P14D"[options.exclude-newer-package]+setuptools = false+h2 = falsevercel = false+pillow = false+unpaddedbase64 = false+defusedxml = falseaiohttp = falsecryptography = false+mcp = false+python-olm = falsenemo-relay = falsehuggingface-hub = false-h2 = false[manifest]overrides = [