Expand description
§Type hierarchy
When we receive the requirements from pip sync, we check which requirements already fulfilled
in the users environment (InstalledDist), whether the matching package is in our wheel cache
(CachedDist) or whether we need to download, (potentially build) and install it (Dist).
These three variants make up BuiltDist.
§Dist
A Dist is either a built distribution (a wheel), or a source distribution that exists at
some location. We translate every PEP 508 requirement e.g. from requirements.txt or from
pyproject.toml’s [project] dependencies into a Dist by checking each index.
BuiltDist: A wheel, with its three possible origins:SourceDist: A source distribution, with its four possible origins:
§CachedDist
A CachedDist is a built distribution (wheel) that exists in the local cache, with the two
possible origins we currently track:
§InstalledDist
An InstalledDist is built distribution (wheel) that is installed in a virtual environment,
with the two possible origins we currently track:
Since we read this information from direct_url.json, it doesn’t match the information Dist exactly.
Structs§
- Archived
File - An archived
File - Archived
UrlString - An archived
UrlString - Archived
Zstd - An archived
Zstd - Build
Info - A digest representing the build settings, such as build dependencies or other build-time configuration.
- Cached
Direct UrlDist - Cached
Registry Dist - Config
Setting Entry - Config
Setting Package Entry - Config
Settings - Settings to pass to a PEP 517 build backend, structured as a map from (string) key to string or list of strings.
- Dependency
Metadata - Pre-defined
StaticMetadataentries, indexed byPackageNameandVersion. - Derivation
Chain - A chain of derivation steps from the root package to the current package, to explain why a package is included in the resolution.
- Derivation
Step - A step in a derivation chain.
- Direct
Source Url - Direct
UrlBuilt Dist - A built distribution (wheel) that exists at an arbitrary URL.
- Direct
UrlSource Dist - A source distribution that exists at an arbitrary URL.
- Directory
Source Dist - A source distribution that exists in a local directory.
- Directory
Source Url - Extra
Build Requirement - Extra
Build Requires - Lowered extra build dependencies with source resolution applied.
- Extra
Build Variables - Extra environment variables to set during builds, on a per-package basis.
- File
- Internal analog to
uv_pypi_types::PypiFile. - File
Resolver - The resolver for an archived
File - GitSource
Dist - A source distribution that exists in a Git repository.
- GitSource
Url - Index
- Index
Cache Control - Cache control configuration for an index.
- Index
Capabilities - A map of
IndexUrls to their capabilities. - Index
Locations - The index locations to use for fetching packages. By default, uses the PyPI index.
- Index
Metadata - An
IndexUrlalong with the metadata necessary to query the index. - Index
Metadata Ref - A reference to an
IndexMetadata. - Index
Name - The normalized name of an index.
- Index
Urls - The index URLs to use for fetching packages.
- Installed
Direct UrlDist - Installed
Dist - Installed
EggInfo Directory - Installed
EggInfo File - Installed
Legacy Editable - Installed
Registry Dist - Name
Requirement Specification - An
UnresolvedRequirementwith additional metadata fromrequirements.txt, currently only hashes but in the future also editable and similar information. - Package
Config Settings - Settings to pass to PEP 517 build backends on a per-package basis.
- Path
Built Dist - A built distribution (wheel) that exists in a local directory.
- Path
Source Dist - A source distribution that exists in a local archive (e.g., a
.tar.gzfile). - Path
Source Url - PipExtra
Index - PipFind
Links - PipIndex
- Prioritized
Dist - A collection of distributions that have been filtered by relevance.
- Registry
Built Dist - A built distribution (wheel) that exists in a registry, like
PyPI. - Registry
Built Wheel - A built distribution (wheel) that exists in a registry, like
PyPI. - Registry
Source Dist - A source distribution that exists in a registry, like
PyPI. - Requirement
- A representation of dependency on a package, an extension over a PEP 508’s requirement.
- Requires
Python - The
Requires-Pythonrequirement specifier. - Requires
Python Range - Resolution
- A set of packages pinned at specific versions.
- Serializable
Status Code - Simplified
Marker Tree - A simplified marker is just like a normal marker, except it has possibly
been simplified by
requires-python. - Source
Annotations - A collection of source annotations.
- Static
Metadata - A subset of the Python Package Metadata 2.3 standard as specified in https://packaging.python.org/specifications/core-metadata/.
- Unresolved
Requirement Specification - An
UnresolvedRequirementwith additional metadata fromrequirements.txt, currently only hashes but in the future also editable and similar information. - UrlString
- A [
Url] represented as aString. - UrlString
Resolver - The resolver for an archived
UrlString - Zstd
- Zstd
Resolver - The resolver for an archived
Zstd
Enums§
- Archived
File Location - An archived
FileLocation - Buildable
Source - A reference to a source that can be built into a built distribution.
- Built
Dist - A wheel, with its three possible origins (index, url, path)
- Cached
Dist - A built distribution (wheel) that exists in the local cache.
- Canonical
Version - Like
InstalledVersion, but withCanonicalUrlto ensure robust URL comparisons. - Compatible
Dist - A distribution that can be used for both resolution and installation.
- Dist
- Either a built distribution, a wheel, or a source distribution that exists at some location.
- Dist
Error Kind - The operation(s) that failed when reporting an error with a distribution.
- DistRef
- A reference to a built or source distribution.
- Distribution
Id - A unique resource identifier for the distribution, like a SHA-256 hash of the distribution’s contents.
- Edge
- An edge in the resolution graph.
- Error
- Extra
Build Requires Error - File
Conversion Error - Error converting
uv_pypi_types::PypiFileto [distribution_type::File]. - File
Location - While a registry file is generally a remote URL, it can also be a file if it comes from a directory flat indexes.
- File
Location Resolver - The resolver for an archived
FileLocation - Hash
Comparison - Hash
Generation - The context in which hashes should be generated.
- Hash
Policy - Incompatible
Dist - Incompatible
Source - Incompatible
Wheel - Index
Format - Index
Name Error - An error that can occur when parsing an
IndexName. - Index
Source Error - An error that can occur when parsing an
Index. - Index
Status Code Decision - Decision on whether to continue searching the next index.
- Index
Status Code Strategy - Index
Url - The URL of an index to use for fetching packages (e.g., PyPI).
- Index
UrlError - An error that can occur when parsing an
IndexUrl. - Installed
Dist Error - Installed
Dist Kind - A built distribution (wheel) that is installed in a virtual environment.
- Installed
Version - Known
Platform - A platform for which the resolver is solving.
- Local
Dist - A distribution which is either installable, is a wheel in our cache or is already installed.
- Node
- A node in the resolution, along with whether its been filtered out.
- Origin
- The origin of a piece of configuration.
- Package
Id - A unique identifier for a package. A package can either be identified by a name (e.g.,
black) or a URL (e.g.,git+https://github.com/psf/black). - Python
Requirement Kind - Requested
Dist - A distribution that can be requested during resolution.
- Requirement
Error - Requirement
Source - The different locations with can install a distribution from: Version specifier (from an index), HTTP(S) URL, git repository, and path.
- Resolution
Diagnostic - Resolved
Dist - A distribution that can be used for resolution and installation.
- Resolved
Dist Ref - A variant of
ResolvedDistwith borrowed inner distributions. - Resource
Id - A unique identifier for a resource, like a URL or a Git repository.
- Source
Annotation - Source of a dependency, e.g., a
-r requirements.txtfile. - Source
Dist - A source distribution, with its possible origins (index, url, path, git)
- Source
Dist Compatibility - Source
Url - A reference to a source distribution defined by a URL.
- ToUrl
Error - An error that occurs when a
FileLocationis not a valid URL. - Unresolved
Requirement - A requirement read from a
requirements.txtorpyproject.tomlfile. - Version
Id - A unique identifier for a package at a specific version (e.g.,
black==23.10.0). - Version
OrUrl Ref - Wheel
Compatibility
Traits§
- Diagnostic
- Distribution
Metadata - Metadata that can be resolved from a requirements specification alone (i.e., prior to building or installing the distribution).
- Hashed
- Identifier
- Installed
Metadata - Metadata that can be resolved from a built distribution.
- IsBuild
Backend Error - Inspect whether an error type is a build error.
- Name
- Remote
Source - Verbatim
Functions§
- implied_
markers - Given a wheel filename, determine the set of supported markers.
Type Aliases§
- Build
Variables - A map of extra build variables, from variable name to value.