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:
konsti 2023-11-16 19:03:44 +01:00 committed by GitHub
parent 3a4988f999
commit 751f7fa9c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 53 additions and 27 deletions

View file

@ -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
}
}