uv/crates
Charlie Marsh 10cd6b94c9
Normalize extras in lockfile (#3958)
## Summary

Previously, when we locked something like `flask[dotenv]`, we created
two separate distributions in the lockfile: one for `flask`, which
included the base dependencies, and one for `flask[dotenv]`, which
included the base dependencies _and_ the `dotenv` dependencies. This was
easy to implement, but it meant that we were duplicating all of the
distribution files for every extra, and duplicating all of the base
dependencies for every extra.

This PR normalizes the data such that we now have one entry per
distribution (i.e., `ExtraName` was removed from `DistributionId`), with
an optional dependencies table with an entry per extra, like:

```toml
[[distribution]]
name = "project"
version = "0.1.0"
source = "editable+file://[TEMP_DIR]/"
sdist = { url = "file://[TEMP_DIR]/" }

[[distribution.dependencies]]
name = "anyio"
version = "3.7.0"
source = "registry+https://pypi.org/simple"

[distribution.optional-dependencies]

[[distribution.optional-dependencies.test]]
name = "iniconfig"
version = "2.0.0"
source = "registry+https://pypi.org/simple"
```

This requires a bit more work upfront, because we now need to merge
multiple packages from the `PetGraph` representation when creating the
lockfile.

Closes https://github.com/astral-sh/uv/issues/3916.
2024-06-03 19:00:35 +00:00
..
bench Add Git resolver in lieu of static hash map (#3954) 2024-05-31 22:44:42 -04:00
cache-key Remove some unused `pub use` exports (#3930) 2024-05-30 22:26:52 -04:00
distribution-filename Incorporate build tag into wheel prioritization (#3781) 2024-05-23 21:12:53 +00:00
distribution-types Use `PubGrubPython` type in Python incompatibility reporting (#3992) 2024-06-03 14:32:22 -04:00
install-wheel-rs Support x86 windows (#3873) 2024-05-28 16:07:39 +00:00
once-map Avoid race condition in `OnceMap` (#3987) 2024-06-03 12:25:58 -04:00
pep440-rs feat: bump pep580 and pep440 types (#3860) 2024-05-27 09:38:39 +02:00
pep508-rs Add override namespace to pyproject.toml/uv.toml (#3839) 2024-06-03 12:15:51 +02:00
platform-tags fix: add missing ppc64le alias for powerpc64le (#3963) 2024-06-02 13:15:24 -04:00
pypi-types Discard fragments when parsing unnamed URLs (#3940) 2024-05-31 13:54:15 +00:00
requirements-txt Unify editable and unnamed URL parsing (#3946) 2024-05-31 21:08:00 +00:00
uv Normalize extras in lockfile (#3958) 2024-06-03 19:00:35 +00:00
uv-auth Increase verbosity of credential fetch logs (#3550) 2024-05-13 15:55:57 +00:00
uv-build Add support for `tool.uv` into distribution building (#3904) 2024-05-31 02:42:03 +00:00
uv-cache Remove special-casing for editable requirements (#3869) 2024-05-28 15:49:34 +00:00
uv-client Remove some `anyhow` usages (#3962) 2024-06-01 20:11:23 +00:00
uv-configuration Add support for `tool.uv` into distribution building (#3904) 2024-05-31 02:42:03 +00:00
uv-dev Add Git resolver in lieu of static hash map (#3954) 2024-05-31 22:44:42 -04:00
uv-dispatch feat: add back the use of extra env vars to the build dispatch (#3981) 2024-06-03 09:13:44 -04:00
uv-distribution Add `uv run --package` (#3864) 2024-06-02 21:42:14 +00:00
uv-extract Fix nightly cfg checker warnings (#3932) 2024-05-31 09:35:52 +00:00
uv-fs Add support for `tool.uv` into distribution building (#3904) 2024-05-31 02:42:03 +00:00
uv-git Remove some `anyhow` usages (#3962) 2024-06-01 20:11:23 +00:00
uv-installer Add `uv run --package` (#3864) 2024-06-02 21:42:14 +00:00
uv-interpreter Add missing i686 alias for x86 (#3899) 2024-05-29 11:31:39 -04:00
uv-normalize Improve JSON Schema and add export script (#3461) 2024-05-08 16:15:16 +00:00
uv-requirements Remove some `anyhow` usages (#3962) 2024-06-01 20:11:23 +00:00
uv-resolver Normalize extras in lockfile (#3958) 2024-06-03 19:00:35 +00:00
uv-state Add persistent storage of installed toolchains (#3797) 2024-05-27 03:54:49 +00:00
uv-trampoline Support x86 windows (#3873) 2024-05-28 16:07:39 +00:00
uv-types Add Git resolver in lieu of static hash map (#3954) 2024-05-31 22:44:42 -04:00
uv-version Bump version to v0.2.6 (#3991) 2024-06-03 17:40:28 +00:00
uv-virtualenv Rewrite Python interpreter discovery (#3266) 2024-05-21 14:37:23 -05:00
uv-warnings Rename to `uv` (#1302) 2024-02-15 11:19:46 -06:00
uv-workspace Add override namespace to pyproject.toml/uv.toml (#3839) 2024-06-03 12:15:51 +02:00
README.md Rename `uv-traits` and split into separate modules (#2674) 2024-03-26 15:39:43 -05:00

README.md

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-interpreter

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.