uv/crates
Charlie Marsh cedd2e0b3f
Use a buffered reader for wheel metadata (#1082)
## Summary

It turns out this is significantly faster when reading (e.g.) _just_ the
`METADATA` file from a zipped wheel.

I audited other `File::open` usages, and everything else seems to be
using a buffered reader already (directly, or in whatever third-party
crate it's passed to) _or_ is read immediately in full.

See the criterion benchmark:

```
file_reader/numpy-1.26.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
                        time:   [6.9618 ms 6.9664 ms 6.9713 ms]
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild
file_reader/flask-3.0.1-py3-none-any.whl
                        time:   [237.50 µs 238.25 µs 239.13 µs]
Found 7 outliers among 100 measurements (7.00%)
  3 (3.00%) high mild
  4 (4.00%) high severe

buffered_reader/numpy-1.26.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
                        time:   [648.92 µs 653.85 µs 660.09 µs]
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe
buffered_reader/flask-3.0.1-py3-none-any.whl
                        time:   [39.578 µs 39.712 µs 39.869 µs]
Found 8 outliers among 100 measurements (8.00%)
  3 (3.00%) high mild
  5 (5.00%) high severe
```
2024-01-24 15:22:55 -05:00
..
bench Use Clippy lint table over Cargo config (#490) 2023-11-22 15:10:27 +00:00
cache-key Avoid storing absolute URLs for files (#944) 2024-01-17 09:15:21 -05:00
distribution-filename Implement --find-links as flat indexes (directories in pip-compile) (#912) 2024-01-15 02:04:10 +00:00
distribution-types Initial windows support (#940) 2024-01-24 18:27:49 +01:00
gourgeist Initial windows support (#940) 2024-01-24 18:27:49 +01:00
install-wheel-rs Initial windows support (#940) 2024-01-24 18:27:49 +01:00
once-map Propagate cancellation errors in OnceMap (#1032) 2024-01-22 09:00:21 -05:00
pep440-rs Rename pep440-rs to Readme.md (#1014) 2024-01-19 15:16:12 -05:00
pep508-rs Initial windows support (#940) 2024-01-24 18:27:49 +01:00
platform-host Remove some unused dependencies (#1077) 2024-01-24 11:58:21 -05:00
platform-tags Add support for PyPy wheels (#1028) 2024-01-22 14:22:27 +00:00
puffin Add warning when target version does not match build version (#1072) 2024-01-24 13:42:19 -06:00
puffin-build Add support for PyPy wheels (#1028) 2024-01-22 14:22:27 +00:00
puffin-cache Use a consistent Timestamp struct (#1081) 2024-01-24 14:21:31 -05:00
puffin-client Use a buffered reader for wheel metadata (#1082) 2024-01-24 15:22:55 -05:00
puffin-dev Use a separate memory index for each requirement (#1036) 2024-01-22 16:22:03 +00:00
puffin-dispatch Add support for disabling installation from pre-built wheels (#956) 2024-01-19 11:24:27 -06:00
puffin-distribution Use a buffered reader for wheel metadata (#1082) 2024-01-24 15:22:55 -05:00
puffin-extract Use fs_err in more places (#926) 2024-01-15 09:39:33 +00:00
puffin-fs Avoid unzipping local wheels when fresh (#1076) 2024-01-24 15:01:16 +00:00
puffin-git Split puffin-cache into Puffin-specific and generic utilities (#728) 2023-12-25 14:38:56 +00:00
puffin-installer Use a consistent Timestamp struct (#1081) 2024-01-24 14:21:31 -05:00
puffin-interpreter Use a consistent Timestamp struct (#1081) 2024-01-24 14:21:31 -05:00
puffin-normalize Avoid some additional clones for PackageName (#896) 2024-01-12 17:54:40 +00:00
puffin-resolver Initial windows support (#940) 2024-01-24 18:27:49 +01:00
puffin-traits Add support for disabling installation from pre-built wheels (#956) 2024-01-19 11:24:27 -06:00
puffin-warnings Migrate back to owo-colors (#824) 2024-01-08 08:54:57 +00:00
puffin-workspace Use Clippy lint table over Cargo config (#490) 2023-11-22 15:10:27 +00:00
pypi-types make some things guaranteed to be deterministic (#1065) 2024-01-23 20:30:33 -05:00
requirements-txt Initial windows support (#940) 2024-01-24 18:27:49 +01:00
README.md Rename puffin-cli crate to puffin (#976) 2024-01-18 19:02:52 -05:00

Crates

bench

Functionality for benchmarking Puffin.

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.

gourgeist

A venv replacement to create virtual environments in Rust.

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.

puffin

Command-line interface for the Puffin package manager.

puffin-build

A PEP 517-compatible build frontend for Puffin.

puffin-cache

Functionality for caching Python packages and associated metadata.

puffin-client

Client for interacting with PyPI-compatible HTTP APIs.

puffin-dev

Development utilities for Puffin.

puffin-dispatch

A centralized struct for resolving and building source distributions in isolated environments. Implements the traits defined in puffin-traits.

puffin-distribution

Client for interacting with built distributions (wheels) and source distributions (sdists). Capable of fetching metadata, distribution contents, etc.

puffin-extract

Utilities for extracting files from archives.

puffin-fs

Utilities for interacting with the filesystem.

puffin-git

Functionality for interacting with Git repositories.

puffin-installer

Functionality for installing Python packages into a virtual environment.

puffin-interpreter

Functionality for detecting and leveraging the current Python interpreter.

puffin-normalize

Normalize package and extra names as per Python specifications.

puffin-package

Types and functionality for working with Python packages, e.g., parsing wheel files.

puffin-resolver

Functionality for resolving Python packages and their dependencies.

puffin-traits

Shared traits for Puffin, to avoid circular dependencies.

pypi-types

General-purpose type definitions for types used in PyPI-compatible APIs.

puffin-warnings

User-facing warnings for Puffin.

requirements-txt

Functionality for parsing requirements.txt files.