Fix deserialization of index response when `requires_python` field is missing

This commit is contained in:
Zanie 2023-12-19 13:06:52 -06:00
parent 2497b88ead
commit a22aba06da
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ pub struct File {
pub hashes: Hashes,
/// Note: Deserialized with [`LenientVersionSpecifiers`] since there are a number of invalid
/// versions on pypi
#[serde(deserialize_with = "deserialize_version_specifiers_lenient")]
#[serde(default, deserialize_with = "deserialize_version_specifiers_lenient")]
pub requires_python: Option<VersionSpecifiers>,
pub size: Option<usize>,
pub upload_time: Option<DateTime<Utc>>,