uv/crates
Charlie Marsh bf79d985ee
Allow incompatible `requires-python` for source distributions with static metadata (#8768)
## Summary

At present, when we have a Python requirement and we see a wheel, we
verify that the Python requirement is compatible with the wheel. For
source distributions, though, we verify that both the Python requirement
_and_ the currently-installed version are compatible, because we assume
that we'll need to build the source distribution in order to get
metadata. However, we can often extract source distribution metadata
_without_ building (e.g., if there's a `pyproject.toml` with no dynamic
keys).

This PR thus modifies the source distribution handling to defer that
incompatibility ("We couldn't get metadata for this project, because it
has no static metadata and requires a higher Python version to run /
build") until we actually try to build the package. As a result, you can
now resolve source distribution-only packages using Python versions
below their `requires-python`, as long as they include static metadata.

Closes https://github.com/astral-sh/uv/issues/8767.
2024-11-03 19:03:55 +00:00
..
uv Allow incompatible `requires-python` for source distributions with static metadata (#8768) 2024-11-03 19:03:55 +00:00
uv-auth Document `.netrc` environment variable and path (#8511) 2024-10-24 02:34:45 +00:00
uv-bench Avoid showing lower-bound warning outside of explicit lock and sync (#8234) 2024-10-15 20:49:40 -04:00
uv-build-backend Simplify pep440 -> version ranges conversion (#8683) 2024-10-30 13:10:48 +01:00
uv-build-frontend Support transitive dependencies in Git workspaces (#8665) 2024-10-30 19:12:23 +00:00
uv-cache Update CLI documentation for `--cache-dir` (#8627) 2024-10-28 02:01:21 +00:00
uv-cache-info Improve error message for cache info serialization (#8500) 2024-10-23 13:17:31 +00:00
uv-cache-key chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-cli Add support for `uv export --all-packages` (#8742) 2024-11-02 02:25:29 +00:00
uv-client uv-client: switch to RFC 9110 compatible format (#8752) 2024-11-01 09:46:24 -04:00
uv-configuration Add `--no-group` support to CLI (#8477) 2024-10-25 13:27:37 -05:00
uv-console Support interactive input in `uv publish` (#8158) 2024-10-15 10:00:43 +02:00
uv-dev docs: env var doc improvements (#8777) 2024-11-03 13:56:17 -05:00
uv-dirs Add `uv-dirs` to consolidate directory lookup methods (#8453) 2024-10-22 11:33:25 -05:00
uv-dispatch Allow incompatible `requires-python` for source distributions with static metadata (#8768) 2024-11-03 19:03:55 +00:00
uv-distribution Allow incompatible `requires-python` for source distributions with static metadata (#8768) 2024-11-03 19:03:55 +00:00
uv-distribution-filename chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-distribution-types Allow incompatible `requires-python` for source distributions with static metadata (#8768) 2024-11-03 19:03:55 +00:00
uv-extract Sanitize filenames during zip extraction (#8732) 2024-10-31 19:12:51 +00:00
uv-fs Add support for installing versioned Python executables on Windows (#8663) 2024-10-31 15:58:35 +00:00
uv-git Allow dependency metadata entries for direct URL requirements (#7846) 2024-10-22 22:01:23 -04:00
uv-install-wheel Add a trampoline variant that just executes `python` (#8637) 2024-10-29 09:21:15 -05:00
uv-installer Use more precise error messages for preparation failures 2024-10-16 22:08:45 -04:00
uv-macros Generate environment variables doc from code (#8493) 2024-11-03 08:31:38 -06:00
uv-metadata chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-normalize Add `--group` support to `uv add` and `uv remove` (#8108) 2024-10-25 13:27:37 -05:00
uv-once-map Use shared resolver state between add and lock (#8146) 2024-10-12 14:58:07 +00:00
uv-options-metadata chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-pep440 Simplify pep440 -> version ranges conversion (#8683) 2024-10-30 13:10:48 +01:00
uv-pep508 Fix feature scoping for pep508 wasm32 support for ruff (#8694) 2024-10-30 12:21:23 +00:00
uv-performance-flate2-backend Run `cargo update` (#8703) 2024-11-01 10:26:21 -04:00
uv-performance-memory-allocator Run `cargo update` (#8703) 2024-11-01 10:26:21 -04:00
uv-platform-tags Add riscv64 to supported Python platform tags (#8660) 2024-10-29 08:48:19 -05:00
uv-publish Check error case for skip existing (#8631) 2024-10-31 15:37:30 +00:00
uv-pypi-types Fix feature scoping for pep508 wasm32 support for ruff (#8694) 2024-10-30 12:21:23 +00:00
uv-python Add support for installing versioned Python executables on Windows (#8663) 2024-10-31 15:58:35 +00:00
uv-requirements Rename dev dependencies to dependency groups in lockfile (#8391) 2024-10-25 13:27:37 -05:00
uv-requirements-txt Always attach URL to network errors (#8444) 2024-10-25 09:10:18 +00:00
uv-resolver Allow incompatible `requires-python` for source distributions with static metadata (#8768) 2024-11-03 19:03:55 +00:00
uv-scripts Add support for named and explicit indexes (#7481) 2024-10-15 18:24:23 -04:00
uv-settings Add support for `default-groups` (#8471) 2024-10-25 13:27:37 -05:00
uv-shell chore: unify all env vars used (#8151) 2024-10-14 16:48:13 -05:00
uv-state Add `uv-dirs` to consolidate directory lookup methods (#8453) 2024-10-22 11:33:25 -05:00
uv-static docs: env var doc improvements (#8777) 2024-11-03 13:56:17 -05:00
uv-tool Install versioned Python executables into the bin directory during `uv python install` (#8458) 2024-10-30 14:13:20 +00:00
uv-trampoline Add a trampoline variant that just executes `python` (#8637) 2024-10-29 09:21:15 -05:00
uv-trampoline-builder Add support for installing versioned Python executables on Windows (#8663) 2024-10-31 15:58:35 +00:00
uv-types Allow incompatible `requires-python` for source distributions with static metadata (#8768) 2024-11-03 19:03:55 +00:00
uv-version Bump version to 0.4.29 (#8711) 2024-10-30 18:22:53 -05:00
uv-virtualenv chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-warnings chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-workspace Enable `--all-packages --frozen` in `uv sync` and `uv export` (#8760) 2024-11-02 02:48:55 +00:00
README.md Link to Dependency specifiers instead of PEP 508 (#8411) 2024-10-21 14:43:38 -04:00

README.md

Crates

uv-bench

Functionality for benchmarking uv.

uv-cache-key

Generic functionality for caching paths, URLs, and other resources across platforms.

uv-distribution-filename

Parse built distribution (wheel) and source distribution (sdist) filenames to extract structured metadata.

uv-distribution-types

Abstractions for representing built distributions (wheels) and source distributions (sdists), and the sources from which they can be downloaded.

uv-install-wheel-rs

Install built distributions (wheels) into a virtual environment.

uv-once-map

A waitmap-like concurrent hash map for executing tasks exactly once.

uv-pep440-rs

Utilities for interacting with Python version numbers and specifiers.

uv-pep508-rs

Utilities for parsing and evaluating dependency specifiers, previously known as PEP 508.

uv-platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

uv-cli

Command-line interface for the uv package manager.

uv-build-frontend

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

Functionality for detecting and leveraging the current Python interpreter.

uv-normalize

Normalize package and extra names as per Python specifications.

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

Utilities for detecting and manipulating shell environments.

uv-types

Shared traits for uv, to avoid circular dependencies.

uv-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.

uv-workspace

Workspace abstractions for uv.

uv-requirements-txt

Functionality for parsing requirements.txt files.