Use indented inline tables for `distribution.dependencies`, `distribution.optional-dependencies` and `distribution.dev-dependencies`. The new style is more concise (see examples below) and it makes the association between a distribution and its dependencies clearer (previously, they were both individual `[[...]]` blocks separated by newlines). The style is optimized for small, meaningful diffs by placing each dependency on a single line with a final trailing comma. Whenever a dependency is added, removed or changed, there should be a one line diff in `distribution.dependencies`. The final trailing comma ensures that adding a dependency doesn't change the line ahead. Part of #3611 ## Examples ### Simple workspace package Before: ```toml [[distribution]] name = "bird-feeder" version = "1.0.0" source = "editable+packages/bird-feeder" [[distribution.dependencies]] name = "anyio" [[distribution.dependencies]] name = "seeds" ``` After: ```toml [[distribution]] name = "bird-feeder" version = "1.0.0" source = "editable+packages/bird-feeder" dependencies = [ { name = "anyio" }, { name = "seeds" }, ] ``` ### Flask Before: ```toml [[distribution]] name = "flask" version = "3.0.2" source = "registry+https://pypi.org/simple" sdist = { url = "a89e8120fa/flask-3.0.2.tar.gz", hash = "sha256:822c03f4b799204250a7ee84b1eddc40665395333973dfb9deebfe425fefcb7d", size = 675248 } wheels = [{ url = "aa98bfe0eb/flask-3.0.2-py3-none-any.whl", hash = "sha256:3232e0e9c850d781933cf0207523d1ece087eb8d87b23777ae38456e2fbe7c6e", size = 101300 }] [[distribution.dependencies]] name = "blinker" [[distribution.dependencies]] name = "click" [[distribution.dependencies]] name = "itsdangerous" [[distribution.dependencies]] name = "jinja2" [[distribution.dependencies]] name = "werkzeug" [distribution.optional-dependencies] [[distribution.optional-dependencies.dotenv]] name = "python-dotenv" ``` After: ```toml [[distribution]] name = "flask" version = "3.0.2" source = "registry+https://pypi.org/simple" sdist = { url = "a89e8120fa/flask-3.0.2.tar.gz", hash = "sha256:822c03f4b799204250a7ee84b1eddc40665395333973dfb9deebfe425fefcb7d", size = 675248 } dependencies = [ { name = "blinker" }, { name = "click" }, { name = "itsdangerous" }, { name = "jinja2" }, { name = "werkzeug" }, ] wheels = [{ url = "aa98bfe0eb/flask-3.0.2-py3-none-any.whl", hash = "sha256:3232e0e9c850d781933cf0207523d1ece087eb8d87b23777ae38456e2fbe7c6e", size = 101300 }] [distribution.optional-dependencies] dotenv = [ { name = "python-dotenv" }, ] ``` ### Forking Before: ```toml [[distribution]] name = "project" version = "0.1.0" source = "editable+." [[distribution.dependencies]] name = "package-a" version = "4.3.0" source = "registry+https://astral-sh.github.io/packse/0.3.29/simple-html/" marker = "sys_platform == 'darwin'" [[distribution.dependencies]] name = "package-a" version = "4.4.0" source = "registry+https://astral-sh.github.io/packse/0.3.29/simple-html/" marker = "sys_platform == 'linux'" [[distribution.dependencies]] name = "package-b" marker = "sys_platform == 'linux'" [[distribution.dependencies]] name = "package-c" marker = "sys_platform == 'darwin'" ``` After: ```toml [[distribution]] name = "project" version = "0.1.0" source = "editable+." dependencies = [ { name = "package-a", version = "4.3.0", source = "registry+https://astral-sh.github.io/packse/0.3.29/simple-html/", marker = "sys_platform == 'darwin'" }, { name = "package-a", version = "4.4.0", source = "registry+https://astral-sh.github.io/packse/0.3.29/simple-html/", marker = "sys_platform == 'linux'" }, { name = "package-b", marker = "sys_platform == 'linux'" }, { name = "package-c", marker = "sys_platform == 'darwin'" }, ] ```
Crates
bench
Functionality for benchmarking uv.
cache-key
Generic functionality for caching paths, URLs, and other resources across platforms.
distribution-filename
Parse built distribution (wheel) and source distribution (sdist) filenames to extract structured metadata.
distribution-types
Abstractions for representing built distributions (wheels) and source distributions (sdists), and the sources from which they can be downloaded.
install-wheel-rs
Install built distributions (wheels) into a virtual environment.]
once-map
A waitmap-like concurrent hash map for executing tasks
exactly once.
pep440-rs
Utilities for interacting with Python version numbers and specifiers.
pep508-rs
Utilities for interacting with PEP 508 dependency specifiers.
platform-host
Functionality for detecting the current platform (operating system, architecture, etc.).
platform-tags
Functionality for parsing and inferring Python platform tags as per PEP 425.
uv
Command-line interface for the uv package manager.
uv-build
A PEP 517-compatible build frontend for uv.
uv-cache
Functionality for caching Python packages and associated metadata.
uv-client
Client for interacting with PyPI-compatible HTTP APIs.
uv-dev
Development utilities for uv.
uv-dispatch
A centralized struct for resolving and building source distributions in isolated environments.
Implements the traits defined in uv-types.
uv-distribution
Client for interacting with built distributions (wheels) and source distributions (sdists). Capable of fetching metadata, distribution contents, etc.
uv-extract
Utilities for extracting files from archives.
uv-fs
Utilities for interacting with the filesystem.
uv-git
Functionality for interacting with Git repositories.
uv-installer
Functionality for installing Python packages into a virtual environment.
uv-toolchain
Functionality for detecting and leveraging the current Python interpreter.
uv-normalize
Normalize package and extra names as per Python specifications.
uv-package
Types and functionality for working with Python packages, e.g., parsing wheel files.
uv-requirements
Utilities for reading package requirements from pyproject.toml and requirements.txt files.
uv-resolver
Functionality for resolving Python packages and their dependencies.
uv-types
Shared traits for uv, to avoid circular dependencies.
pypi-types
General-purpose type definitions for types used in PyPI-compatible APIs.
uv-virtualenv
A venv replacement to create virtual environments in Rust.
uv-warnings
User-facing warnings for uv.
requirements-txt
Functionality for parsing requirements.txt files.