uv 0.12 changes project init defaults and build layout, key behaviors clarified

The uv Rust-based Python package manager introduced significant changes in version 0.12.0, released on July 28, 2026, making projects packaged by default with a src layout and build-system table when initialized. A community cheatsheet from Zyte Labs documents these changes, verified against uv 0.12.15 released on September 15, 2026, with real terminal output comparisons. One notable correction to common folklore: uv run does not silently undo pip-installed packages, but uv sync does, since it makes the environment exactly match the lockfile. The tool operates in two distinct modes — project mode driven by pyproject.toml and uv.lock, and a pip-compatibility mode — with no interface indicator of which mode is active. For CI environments, the Scrapy project's uv workflow offers a practical tip: set UV_PYTHON_PREFERENCE to only-system to reuse an already-installed interpreter rather than letting uv fetch a second one.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in