If in doubt, delete the uv.lock file
Python developers on 3.15 can lose minutes to confusing dependency build failures that are fixed simply by deleting a stale uv.lock file.
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.