> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Python 3.15 and uv.lock file compatibility issues
- URL: https://www.stirup.si/python-3-15-and-uv-lock-file-compatibility-issues-215d5e6e/
- Published: 2026-11-01T23:38:01.000Z
- Updated: 2026-11-01T23:38:01.000Z
- Description: Python 3.15 may cause compatibility problems with packages due to uv.lock files pinning incompatible dependency versions, such as when PyO3 does not support Python 3.15.
- Author: Satish Das
- Tags: AI, News, Stirup Research

## Python 3.15 and uv.lock file issues

Python 3.15 introduces new features and improvements, but users may encounter compatibility issues with certain packages. One common problem involves the `uv.lock` file, which can pin dependency versions that are incompatible with Python 3.15\. For instance, some packages may not yet have wheels built for Python 3.15, leading to errors during installation or testing. An example from Simon Willison’s Weblog highlights an error when trying to build `watchfiles==1.1.1`, where the Python interpreter version (3.15) exceeds the maximum supported version (3.14) for PyO3\. In such cases, deleting the `uv.lock` file and rerunning `uv run pytest` often resolves the issue. This approach allows `uv` to regenerate the lock file with updated dependency versions compatible with Python 3.15.

## uv.lock file management in projects

Managing the `uv.lock` file in Python projects can be a source of confusion, particularly when working with libraries that do not include this file by default. As noted in discussions around Python 3.15, many library developers avoid including a `uv.lock` file because it locks dependency versions, which can be restrictive for other projects that rely on the library. However, running commands like `uv run pytest` may inadvertently generate a `uv.lock` file, which is typically excluded from version control via `.gitignore`. This can lead to inconsistencies if the file is not properly managed. Developers are advised to be mindful of when and where these files are created, ensuring they do not interfere with the intended behavior of their projects or dependencies.

## Impact of uv.lock on dependency resolution

The `uv.lock` file plays a critical role in dependency resolution within Python projects, but it can sometimes cause issues when dependencies are not yet compatible with the latest Python versions. As noted in Simon Willison’s Weblog, `uv.lock` may pin a dependency version that lacks support for newer Python interpreters, such as Python 3.15\. For instance, an attempt to build `watchfiles==1.1.1` failed due to an incompatibility with PyO3, which only supports up to Python 3.14\. In such cases, deleting the `uv.lock` file and rerunning `uv run pytest` can often resolve the issue by allowing the system to re-evaluate and select compatible versions of dependencies. This approach should be used with caution, as it may lead to unexpected changes in the project's dependency tree. The advice to delete the file is specific to situations where version mismatches occur and should not be applied universally.

## Sources and reporting notes

- [Simon Willison](https://simonwillison.net/2026/Nov/1/delete-uv-lock-first/?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.