mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-03 13:14:41 +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
|
|
@ -1,8 +1,10 @@
|
|||
use crate::candidate_selector::Candidate;
|
||||
use puffin_normalize::PackageName;
|
||||
use pypi_types::{File, IndexUrl};
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use distribution_types::{File, IndexUrl};
|
||||
use puffin_normalize::PackageName;
|
||||
|
||||
use crate::candidate_selector::Candidate;
|
||||
|
||||
/// A set of package versions pinned to specific files.
|
||||
///
|
||||
/// For example, given `Flask==3.0.0`, the [`FilePins`] would contain a mapping from `Flask` to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue