mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Split File
into internal and external type (#729)
## Summary This PR makes the `pypi_types::File` a response-only type (i.e., a type that's only used when deserializing over the wire), and adds a separate internal `File` type. Right now, the representations are similar, but already, we can avoid the "lenient" deserialization on our internal `File` type, and avoid the special-casing of the property names that's required in the JSON. Over time, we can evolve this representation entirely separately from the representation we receive from PyPI and other indexes.
This commit is contained in:
parent
6ff21374dc
commit
188ab75769
27 changed files with 81 additions and 47 deletions
|
@ -6,13 +6,12 @@ use fs_err as fs;
|
|||
use rustc_hash::FxHashMap;
|
||||
use tracing::warn;
|
||||
|
||||
use distribution_types::{CachedRegistryDist, CachedWheel};
|
||||
use distribution_types::{CachedRegistryDist, CachedWheel, IndexUrls};
|
||||
use pep440_rs::Version;
|
||||
use platform_tags::Tags;
|
||||
use puffin_cache::{Cache, CacheBucket, WheelCache};
|
||||
use puffin_fs::directories;
|
||||
use puffin_normalize::PackageName;
|
||||
use pypi_types::IndexUrls;
|
||||
|
||||
/// A local index of distributions that originate from a registry, like `PyPI`.
|
||||
#[derive(Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue