If in doubt, delete the uv.lock file

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Python developers on 3.15 can lose minutes to confusing dependency build failures that are fixed simply by deleting a stale uv.lock file.

Read this as

Simon Willison shares a fix for a puzzling Python programming error. Python packages sometimes come with a 'lock' file that pins exact versions of other software they need. When those pinned versions lack pre-built files for the new Python 3.15, installing them fails. Deleting the lock file and rerunning usually solves it.

Willison, a prominent Python developer, documents an operational gotcha for teams upgrading to Python 3.15. Stale uv.lock files left by test runs can pin dependency versions without Python 3.15 support, causing build failures like maturin/Pyo3 errors. The remedy, delete the lock file, is cheap, but teams upgrading now should know it to avoid lost debugging time.

Libraries omit uv.lock (pinning dependencies would be rude to consumers), but `uv run pytest` generates one locally, gitignored. With Python 3.15, a pinned version like watchfiles==1.1.1 may lack a 3.15 wheel; maturin's build fails because Pyo3 caps supported Python at 3.14. Deleting the lock and rerunning `uv run pytest` resolves it.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Python 3.15 uv.lock uv run pytest watchfiles==1.1.1 Pyo3 maturin

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading

datasette-charts 0.5a0

Datasette Charts 0.5a0 adds calendar heatmaps, box plots and active-over-time charts, enabling richer data visualisation directly in the browser without extra libraries.