uv 0.12.0

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Python developers running `uv init` will now get src-layout projects with the uv_build backend and a script entry point, a breaking change to new project defaults.

Read this as

uv is a popular free tool that Python programmers use to manage code projects. Version 0.12.0 changes what you get when you run the `uv init` command to start a new project: instead of a single main.py file, it now creates a structured 'src layout' package, sets up the uv_build tool for building distributable files, and adds a runnable script. This affects anyone starting new Python projects with uv; existing projects are untouched.

Astral's uv package manager released version 0.12.0 with breaking changes to its `uv init` project-scaffolding command. New projects now default to a src/ package structure, use the uv_build backend for wheels and tar.gz files, and include a script alias running a main() function in src/uv_init/__init__.py. The cost is migration friction for teams relying on old defaults; the benefit is modern, build-ready project structure. No timeline for a 1.0 release was given.

uv 0.12.0 changes `uv init` defaults: it scaffolds a src/-layout package rather than a root main.py, configures the uv_build backend for `uv build` outputs (wheels and .tar.gz), and defines a project.scripts entry mapping uv-init to uv_init:main. The generated src/uv_init/__init__.py contains a type-annotated main() -> None printing a greeting. Simon Willison's auto-snapshotting GitHub repository documents the full diff against the 0.11.x output.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

uv 0.12.0 uv init uv_build src layout uv

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading