Delete uv.lock file when facing Python 3.15 dependency issues
In brief
- Python 3.15 dependency errors can be fixed by deleting the uv.lock file.
- Some dependency versions like watchfiles 1.1.1 are not yet compatible with Python 3.15.
- Regenerating uv.lock after deletion often solves the problem.
A developer reports recurring Python dependency errors after upgrading to Python 3.15. The suggested fix is to delete the uv.lock file generated during commands like `uv run pytest`.
This file may pin a dependency version incompatible with Python 3.15, such as watchfiles 1.1.1 which requires PyO3 3.14 at most. Removing the file and rerunning the command usually resolves the issue.
This summary gives you the essentials. The full article, its figures and quotes are on Simon Willison's Weblog.
Read the original articleAI-generated summary of the source, checked by rules. How we write · Report an error