uv 0.12.0

Simon Willison's Blog Tools

Summary

uv 0.12.0 introduces breaking changes to `uv init`, defaulting to a `src/`-based package layout, configuring the uv_build backend, and setting up a script alias. The update encourages modern Python project structure.

No content available
Original Article
View Cached Full Text

Cached at: 07/28/26, 10:24 PM

# uv 0.12.0 Source: [https://simonwillison.net/2026/Jul/28/uv/](https://simonwillison.net/2026/Jul/28/uv/) 28th July 2026 \- Link Blog **[uv 0\.12\.0](https://github.com/astral-sh/uv/releases/tag/0.12.0)**\. Some interesting breaking changes in this release of`uv`, in particular to the default project produced by the`uv init`command\. [uv init](https://docs.astral.sh/uv/concepts/projects/init/)is the`uv`shortcut for creating a new project\. The previous version of`uv`, version 0\.11\.x, produced[this directory](https://github.com/simonw/uv-init-demos/tree/29656a55ec733a632005abfd7b89dea5c04fa10b/uv-init)when you ran`uv init uv\-init`\. Here's[what you get with uv 0\.12](https://github.com/simonw/uv-init-demos/tree/9111a2bb85741f034eee2fd63efe13ef98b37a14/uv-init)\. I have a GitHub repository that[automatically snapshots](https://simonwillison.net/2025/Dec/24/uv-init-demos/)the output of`uv init`, so you can also[see the full diff](https://github.com/simonw/uv-init-demos/commit/9111a2bb85741f034eee2fd63efe13ef98b37a14#diff-e036881d034aedd813010ffa96464995ae5b0339213d6f4ab492f97442c5bdd4): ![GitHub diff view. uv-init/main.py is an old __name__=="__main__" file that has been entirely deleted. The pyproject.toml now has an authors list and a new project.scripts block defining uv-init as uv_init:main - and a new build-system block that uses uv_build as the build-backend. A new src/uv_init/__init__.py file contains a main() method with a -> None type annotation that prints Hello from uv-init.](https://static.simonwillison.net/static/2026/uv-diff.webp) `uv init`now defaults to a`src/`shaped package, instead of dropping`main\.py`in the root of the project\. It also configures the[uv\_build backend](https://docs.astral.sh/uv/concepts/build-backend/)for building wheels and`\.tar\.gz`distribution files when you run`uv build`\. Finally, it sets up`uv\-init`as a script alias which, when run with`uv run uv\-init`, executes a new`main\(\)`function in`src/uv\_init/\_\_init\_\_\.py`\. I've so far avoided using[src layout](https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/)in my own projects just out of inertia\. I think it's time I switched\. I wonder when`uv`will be judged ready for a 1\.0 release?

Similar Articles

Uv 0.12.0

Hacker News Top

uv 0.12.0 is a major release of the extremely fast Python package and project manager written in Rust, offering a replacement for pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more.

Vulnerability and malware checks in uv

Lobsters Hottest

uv announces new security features: a fast dependency auditing command (uv audit) and optional malware scanning on sync operations, both currently in preview.