uv/crates
Charlie Marsh 1b3a3f4e80
Add `--refresh` behavior to the cache (#1057)
## Summary

This PR is an alternative approach to #949 which should be much safer.
As in #949, we add a `Refresh` policy to the cache. However, instead of
deleting entries from the cache the first time we read them, we now
check if the entry is sufficiently new (created after the start of the
command) if the refresh policy applies. If the entry is stale, then we
avoid reading it and continue onward, relying on the cache to
appropriately overwrite based on "new" data. (This relies on the
preceding PRs, which ensure the cache is append-only, and ensure that we
can atomically overwrite.)

Unfortunately, there are just a lot of paths through the cache, and
didn't data is handled with different policies, so I really had to go
through and consider the "right" behavior for each case. For example,
the HTTP requests can use `max-age=0, must-revalidate`. But for the
routes that are based on filesystem modification, we need to do
something slightly different.

Closes #945.
2024-01-23 18:30:26 -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 Improve error message when editable requirement doesn't exist (#1024) 2024-01-20 12:59:18 -05:00
gourgeist Add support for PyPy wheels (#1028) 2024-01-22 14:22:27 +00:00
install-wheel-rs Validate wheel metadata against filename (#1002) 2024-01-19 05:48:55 +00: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 Allow relative paths in requirements.txt (#1027) 2024-01-22 14:20:30 +00:00
platform-host Error when `ldd` is not in path (#506) 2023-11-28 05:55:04 +00:00
platform-tags Add support for PyPy wheels (#1028) 2024-01-22 14:22:27 +00:00
puffin Add `--refresh` behavior to the cache (#1057) 2024-01-23 18:30:26 -05:00
puffin-build Add support for PyPy wheels (#1028) 2024-01-22 14:22:27 +00:00
puffin-cache Add `--refresh` behavior to the cache (#1057) 2024-01-23 18:30:26 -05:00
puffin-client Add `--refresh` behavior to the cache (#1057) 2024-01-23 18:30:26 -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 Add `--refresh` behavior to the cache (#1057) 2024-01-23 18:30:26 -05:00
puffin-extract Use fs_err in more places (#926) 2024-01-15 09:39:33 +00:00
puffin-fs Add `--refresh` behavior to the cache (#1057) 2024-01-23 18:30:26 -05:00
puffin-git Split `puffin-cache` into Puffin-specific and generic utilities (#728) 2023-12-25 14:38:56 +00:00
puffin-installer Add `--refresh` behavior to the cache (#1057) 2024-01-23 18:30:26 -05:00
puffin-interpreter Add `--refresh` behavior to the cache (#1057) 2024-01-23 18:30:26 -05:00
puffin-normalize Avoid some additional clones for `PackageName` (#896) 2024-01-12 17:54:40 +00:00
puffin-resolver Fix missing comma before conclusions (#1042) 2024-01-22 13:31:09 -06: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 Remove RFC2047 decoder (#967) 2024-01-18 15:09:45 -05:00
requirements-txt Allow relative paths in requirements.txt (#1027) 2024-01-22 14:20:30 +00:00
README.md Rename `puffin-cli` crate to `puffin` (#976) 2024-01-18 19:02:52 -05:00

README.md

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.