uv/crates
Charlie Marsh a0494bb059
Fetch concurrently for non-first-match index strategies (#10432)
## Summary

On a basic test, this speeds up cold resolution by about 25%:

```
❯ hyperfine "uv lock --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match --upgrade --no-cache" "../target/release/uv lock --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match --upgrade --no-cache" --warmup 10 --runs 30
Benchmark 1: uv lock --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match --upgrade --no-cache
  Time (mean ± σ):     585.8 ms ±  28.2 ms    [User: 149.7 ms, System: 97.4 ms]
  Range (min … max):   541.5 ms … 654.8 ms    30 runs

Benchmark 2: ../target/release/uv lock --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match --upgrade --no-cache
  Time (mean ± σ):     468.3 ms ±  52.0 ms    [User: 131.7 ms, System: 76.9 ms]
  Range (min … max):   380.2 ms … 607.0 ms    30 runs

Summary
  ../target/release/uv lock --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match --upgrade --no-cache ran
    1.25 ± 0.15 times faster than uv lock --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match --upgrade --no-cache
```

Given:
```toml
[project]
name = "foo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12.0"
dependencies = [
    "black>=24.10.0",
    "django>=5.1.4",
    "flask>=3.1.0",
    "requests>=2.32.3",
]
```

And:

```shell
hyperfine "uv lock --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match --upgrade --no-cache" "../target/release/uv lock --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match --upgrade --no-cache" --warmup 10 --runs 30
```

Closes https://github.com/astral-sh/uv/issues/10429.
2025-01-09 12:45:20 -05:00
..
uv Update PEP 723 lockfile in uv remove --script (#10162) 2025-01-08 22:05:37 +00:00
uv-auth Remove unnecessary prefixes (#10158) 2024-12-25 14:18:01 -05:00
uv-bench Avoid liblzma-dev system dep in uv-dev and uv-bench (#9933) 2024-12-17 16:12:33 +01:00
uv-build-backend Include extras in uv-build Requires-Dist metadata (#10110) 2024-12-23 08:56:53 -05:00
uv-build-frontend Detect cyclic dependencies during builds (#10258) 2024-12-31 22:22:42 -05:00
uv-cache Avoid reusing interpreter metadata when running under Rosetta (#9846) 2024-12-12 13:21:35 -05:00
uv-cache-info Allow environment variables to be included in cache keys (#10170) 2024-12-26 15:31:49 +00:00
uv-cache-key Remove separate test files in favor of same-file mod tests (#9199) 2024-11-18 20:11:46 +00:00
uv-cli Add --script support to uv export for PEP 723 scripts (#10160) 2025-01-08 21:48:53 +00:00
uv-client Fetch concurrently for non-first-match index strategies (#10432) 2025-01-09 12:45:20 -05:00
uv-configuration Respect PEP 723 script lockfiles in uv run (#10136) 2025-01-08 20:34:45 +00:00
uv-console Support interactive input in uv publish (#8158) 2024-10-15 10:00:43 +02:00
uv-dev Shrink Dist from 352 to 288 bytes (#10389) 2025-01-08 09:33:19 -05:00
uv-dirs Eliminate dependencies on directores and dirs-sys (#8048) 2024-11-07 14:29:54 -06:00
uv-dispatch Detect cyclic dependencies during builds (#10258) 2024-12-31 22:22:42 -05:00
uv-distribution Use dynamic dispatch to simplify reporters (#10086) 2025-01-06 12:04:00 -05:00
uv-distribution-filename Add test coverage for build tag prioritization (#9680) 2024-12-06 09:32:19 -05:00
uv-distribution-types Shrink Dist from 352 to 288 bytes (#10389) 2025-01-08 09:33:19 -05:00
uv-extract Upgrade minimum Rust version to 1.83 (#9815) 2024-12-11 10:06:19 -06:00
uv-fs Use portable path instead of string for subdirectory (#10069) 2024-12-21 00:28:36 +00:00
uv-git Use dynamic dispatch to simplify reporters (#10086) 2025-01-06 12:04:00 -05:00
uv-globfilter Build backend: Revamp include/exclude (#9525) 2024-12-01 11:32:35 +00:00
uv-install-wheel fix: always write slash paths to RECORD file (#10164) 2024-12-26 09:33:32 -05:00
uv-installer Avoid downgrading packages when --upgrade is provided (#10097) 2025-01-06 17:41:43 -05:00
uv-macros Remove unnecessary prefixes (#10158) 2024-12-25 14:18:01 -05:00
uv-metadata chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-normalize Remove unnecessary prefixes (#10158) 2024-12-25 14:18:01 -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 Upgrade minimum Rust version to 1.83 (#9815) 2024-12-11 10:06:19 -06:00
uv-pep440 Force a niche into VersionSmall (#10385) 2025-01-08 14:33:39 +01:00
uv-pep508 Remove [u64; 4] from small version to move Arc to full version (#10345) 2025-01-07 14:25:32 +00:00
uv-performance-flate2-backend Re-enable zlib-ng on all platforms (except s390x, PowerPC, and FreeBSD) (#10370) 2025-01-07 13:04:34 -05:00
uv-performance-memory-allocator Run cargo update (#10173) 2024-12-26 12:00:58 -05:00
uv-platform-tags Remove unnecessary .to_string() call (#10419) 2025-01-08 23:59:13 +00:00
uv-publish Avoid enforcing URL check on initial publish (#10182) 2024-12-26 23:46:36 +00:00
uv-pypi-types Strip fragment when storing direct URL (#10093) 2024-12-22 09:07:04 -05:00
uv-python Remove [u64; 4] from small version to move Arc to full version (#10345) 2025-01-07 14:25:32 +00:00
uv-requirements Respect requires-python when installing tools (#10401) 2025-01-08 12:38:17 -05:00
uv-requirements-txt Use matches rather than contains in requirements.txt parsing (#10423) 2025-01-09 02:32:09 +00:00
uv-resolver Remove duplicated comment (#10416) 2025-01-08 23:06:09 +00:00
uv-scripts Update PEP 723 lockfile in uv add --script (#10145) 2025-01-08 21:19:12 +00:00
uv-settings Accept requirements in uv remove (#10338) 2025-01-07 08:47:05 -05:00
uv-shell Refactor shell quoting (#9055) 2024-11-15 09:06:54 +00:00
uv-state Add uv-dirs to consolidate directory lookup methods (#8453) 2024-10-22 11:33:25 -05:00
uv-static Sync env vars with uv-static crate 🧹 (#10016) 2024-12-18 22:10:27 -05:00
uv-tool Guard against self-deletion in uv venv and uv tool (#10206) 2024-12-29 10:46:45 -05:00
uv-trampoline Update Rust crate thiserror to v2.0.9 (#10112) 2024-12-23 08:48:06 -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 Avoid generating unused hashes during uv lock (#10307) 2025-01-06 00:58:07 +00:00
uv-version Bump version to v0.5.16 (#10395) 2025-01-08 10:29:32 -05:00
uv-virtualenv improve shell compatibility of venv activate scripts (#10397) 2025-01-08 13:12:29 -05:00
uv-warnings chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-workspace Redact new index credentials in uv add (#10329) 2025-01-06 17:24:05 +00:00
README.md Link to Dependency specifiers instead of PEP 508 (#8411) 2024-10-21 14:43:38 -04:00

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.