If in doubt, delete the uv.lock file
, updated First seen Updated Limited coverage, tapering
Industry
Reported by Simon Willison1 source ↓
Simon Willison says deleting a project’s uv.lock file and rerunning tests can resolve some dependency errors after switching to Python 3.15, when the lockfile pins a dependency without a compatible wheel.
Key points
- A uv.lock file can pin a dependency version that has no Python 3.15 wheel
- Willison says deleting the file and rerunning uv run pytest usually fixes the problem
- His library projects do not include uv.lock files, but test runs can create ignored files
Details
Simon Willison reports encountering occasional confusing Python dependency errors after switching to Python 3.15. In some cases, a uv.lock file pins a dependency version for which a Python 3.15 wheel is not yet available.
Willison says running commands such as uv run pytest can leave uv.lock files in a project. His library repositories ignore those files, and he says deleting one and rerunning the command usually resolves the issue.
Written from coverage as of