build: pin uv resolver with exclude-newer - #27
Conversation
Add [tool.uv] exclude-newer = "1 week" so resolution ignores distributions published within the last week. uv resolves the friendly duration relative to the current time on each run, giving a native rolling window without a scheduled bump job. Closes #19
Reviewer's guide (collapsed on small PRs)Reviewer's GuideConfigure uv’s resolver to ignore distributions published within the last week, enforce a minimum uv version that understands the new settings, and regenerate the lockfile to capture the new resolution metadata. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
CI failure is unrelated to this PR's changes. All This is a SonarCloud auth problem — Note: |
Add exclude-newer-package overrides so litestar-org packages (litestar, advanced-alchemy, polyfactory) always resolve to their newest releases while the 1-week cooldown continues to guard third-party dependencies.
|
Addressed the allow-list request in 28a9f2b. uv supports per-package overrides via [tool.uv]
exclude-newer = "1 week"
exclude-newer-package = { litestar = false, advanced-alchemy = false, polyfactory = false }Notes:
|
Add required-version to [tool.uv] so older uv installs fail fast with a clear error instead of silently ignoring the `= false` per-package exclude-newer opt-out (introduced in uv 0.9.25).
The required-version and exclude-newer-package comments both explained the uv 0.9.25 requirement. Keep the rationale on required-version and have exclude-newer-package reference it instead of repeating.
| # Opt first-party (litestar-org) packages out of the cooldown so their newest | ||
| # releases are always resolvable (version gated by required-version above). | ||
| # https://docs.astral.sh/uv/reference/settings/#exclude-newer-package | ||
| exclude-newer-package = { litestar = false, advanced-alchemy = false, polyfactory = false } |
There was a problem hiding this comment.
Is this allow-list enough for now?
# Conflicts: # uv.lock
Description
Adds a
[tool.uv]section pinning the resolver withexclude-newer = "1 week", so uv ignores any distribution published within the last week during resolution. This improves reproducibility and provides a small supply-chain safety buffer against freshly-published (potentially compromised or broken) releases.uv accepts a friendly duration for this setting and resolves it relative to the current time on each run, so
"1 week"is a native rolling window — no scheduled job to bump a static date. This is recorded in the lockfile as:Notes
uv.lockwas regenerated. There are no version downgrades — the diff is limited to uv simplifying environment markers plus the new[options]block.uv run --group test pytest -q→1 passed.Pull Request Checklist
Close Issue(s)
Summary by Sourcery
Configure uv to ignore distributions published within the last week to improve dependency resolution reproducibility and supply-chain safety.
Build: