# If in doubt, delete the uv.lock file

DevFeed: [If in doubt, delete the uv.lock file](<https://devfeed.tech/articles/if-in-doubt-delete-the-uv-lock-file-111030.md>)

Original publisher: [Read original article](<https://simonwillison.net/2026/Nov/1/delete-uv-lock-first/>)

Author: Simon Willison

Published: 2026-11-01T23:24:22Z

Content type: article

Language: en

Sources: [Simon Willison's Weblog](<https://devfeed.tech/sources/simon-willison-s-weblog.md>)

Topics: [Pytest](<https://devfeed.tech/topics/pytest.md>), [versioning](<https://devfeed.tech/topics/versioning.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>)

Tags: [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [python-1-293](<https://devfeed.tech/tags/python-1-293.md>), [python-3-15](<https://devfeed.tech/tags/python-3-15.md>), [til](<https://devfeed.tech/tags/til.md>), [til-27](<https://devfeed.tech/tags/til-27.md>), [uv](<https://devfeed.tech/tags/uv.md>), [uv-103](<https://devfeed.tech/tags/uv-103.md>)

## AI overview

The author's practical rule for a confusing Python 3.15 dependency build error is to delete the local `uv.lock` file and rerun `uv run pytest`; this usually resolves it. The lockfile can pin a dependency version without a Python 3.15 wheel. The example is `watchfiles==1.1.1`, whose build fails because PyO3 supports Python only through 3.14. The author says their library repositories generally omit committed lockfiles, but `uv run` can leave ignored `uv.lock` files behind.

## Source excerpt

I've been getting the occasional confusing Python dependency error since switching over to Python 3.15 and the rule I'm having to remember is: If in doubt, delete the uv.lock file Most of my projects are libraries which don't include a uv.lock file, since it's rude for a library dependency to lock versions for anything else that uses it. Running uv run pytest etc tends to leave uv.lock files lying around, which are listed in .gitignore and so do not get committed to my repositories. But... sometimes that uv.lock pins a version of a dependency that doesn't yet have a Python 3.15 wheel. An example from earlier today: error: Failed to build `watchfiles==1.1.1` cause: Call to `maturin.build_wheel` failed error: the configured Python interpreter version (3.15) is newer than PyO3's maximum supported version (3.14) Deleting that file and running uv run pytest again usually fixes the problem. Tags: uv, til, python