ci: commit uv.lock for reproducible CI; hold mypy <2.1#128
Merged
Conversation
mypy 2.1.0 type-checks numpy's bundled stubs against python_version=3.11 and errors on numpy's PEP 695 `type` statement (valid only on 3.12+), breaking the Type check job on every open PR (including no-op CI bumps). Pin below 2.1 until the regression is resolved upstream. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Documentation build overview
|
Pin ruff/mypy/pre-commit to exact versions so CI (no committed lockfile) is reproducible and dependency bumps arrive as reviewable dependabot PRs instead of silent drift — which is how mypy 2.1.0 broke type-check on unrelated PRs. mypy held at 2.0.0 (2.1.0 errors on numpy's PEP 695 stub under python_version=3.11). Dependabot weekly -> monthly to cut churn. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Track uv.lock and sync with --frozen in CI/docs so the dev graph (incl. transitive deps like numpy) is pinned and reproducible. A dependency now changes only via a dependabot PR that runs CI — a breaking release fails loudly there instead of drifting silently onto unrelated PRs, which is how mypy 2.1.0 broke type-check. mypy bounded <2.1 as a documented hold (2.1.0 errors on numpy's PEP 695 stub under python_version=3.11). Runtime deps stay as ranges; nightly still floats --resolution to test them. Dependabot pip->uv ecosystem (updates the lock), kept monthly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Type check job fails on every open PR — including #126, a no-op
actions/checkoutbump that touches no Python:uv.lockwas gitignored and CI ran a bareuv sync(no--frozen), so every run re-resolved from scratch and silently picked up newly-released deps. mypy 2.1.0 now type-checks numpy's bundled stubs againstpython_version = "3.11"and errors on numpy's PEP 695typestatement (valid only on 3.12+). The break landed on unrelated PRs instead of where it belonged.Fix
Make CI reproducible by committing the lockfile:
uv.lock(un-gitignored) and sync with--frozenin CI + docs. The whole dev/CI graph — including transitive deps like numpy — is now pinned. A dependency changes only when the lock diff changes, in a reviewable PR.pip→uvecosystem). A breaking release now arrives as its own PR that fails CI loudly and gets held — never silently drifting onto a feature PR. Kept monthly (the lock removes the drift risk, so cadence is just churn-vs-granularity).<2.1as a documented hold (lift once the numpy-stub regression is fixed upstream). Lock resolves mypy to 2.0.0.nightly.yamlstill floats--resolution lowest/highestto test the ranges.Verified
uv sync --group dev --frozen+uv run mypy src/pytest_benchmem tests→ Success: no issues found in 25 source files;uv lock --checkclean. Unblocks #127 and #126.🤖 Generated with Claude Code