Skip to content

Sync lockfile with pyproject.toml and prevent future drift with CI check#948

Merged
eepMoody merged 2 commits into
open5e:stagingfrom
ChristopherChudzicki:uv-pin-and-locked-ci
Jun 8, 2026
Merged

Sync lockfile with pyproject.toml and prevent future drift with CI check#948
eepMoody merged 2 commits into
open5e:stagingfrom
ChristopherChudzicki:uv-pin-and-locked-ci

Conversation

@ChristopherChudzicki

Copy link
Copy Markdown

What are the relevant tickets?

Closes #947

Description (What does it do?)

This PR:

  • specifies a uv version constraint in pyproject.toml (I based this on what the production dockerfile currently uses)
  • Adds the same uv version to pr_validation.yml ci check
  • adds --locked to the uv sync on ci to ensure the lockfile is consistent with pyproject.toml
  • regenerates the lockfile

How can this be tested?

  1. Ensure you have uv >= 0.10 locally; you can run uv self update to update.
    • I've tested on uv 0.10.7 and 0.11.19 (latest, afaik)
  2. Run uv sync --locked locally. That should succeed.
  3. If you want, edit pyproject.toml requirements (e.g., change python version) and run uv sync --locked again. It should fail.

Additional Notes

Note

The lockfile shrink is just removal of cpython wheels for python 3.12, 3.13, 3.14 that are no longer necessary after 31d88a1

The committed uv.lock had drifted: it declared `requires-python = ">=3.11"`
while pyproject.toml declared `"==3.11.*"`, leaving unused wheel entries for
Python versions the project doesn't support. CI didn't catch this because
`uv sync` silently reconciles; the prod Dockerfile pins uv to `:0.10`, but
devs and CI ran whatever uv they had.

- Regenerate uv.lock with uv 0.10.7 — realigns requires-python with pyproject
  and drops unused cp312/cp313/cp314 wheel entries. No dependency-version
  changes.
- Add `[tool.uv] required-version = ">=0.10"` to pyproject.toml. Devs and CI
  fail loudly on uv versions below the Dockerfile's :0.10 pin.
- Pin setup-uv to "0.10" in CI so the --locked check runs on the same uv
  minor the prod Dockerfile uses.
- Switch CI's `uv sync` to `uv sync --locked` — the yarn --immutable / npm ci
  equivalent.

Closes open5e#947

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@eepMoody eepMoody merged commit a57418a into open5e:staging Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] uv.lock out of sync

3 participants