mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-24 05:17:05 +00:00
Improve PEP 691 compatibility (#428)
[PEP 691](https://peps.python.org/pep-0691/#project-detail) has slightly different, more relaxed rules around file metadata. These changes are now reflected in the `File` struct. This will make it easier to support alternative indices. I had expected that i need to introduce a separate type for that, so i'm happy it's two `Option`s more and an alias. Part of #412
This commit is contained in:
parent
3a4988f999
commit
751f7fa9c6
8 changed files with 53 additions and 27 deletions
|
|
@ -18,5 +18,6 @@ pypi-types = { path = "../pypi-types" }
|
|||
|
||||
anyhow = { workspace = true }
|
||||
fs-err = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
url = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ impl RemoteSource for RegistryBuiltDist {
|
|||
}
|
||||
|
||||
fn size(&self) -> Option<usize> {
|
||||
Some(self.file.size)
|
||||
self.file.size
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ impl RemoteSource for RegistrySourceDist {
|
|||
}
|
||||
|
||||
fn size(&self) -> Option<usize> {
|
||||
Some(self.file.size)
|
||||
self.file.size
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue