From a22aba06da1156c4f5dbda24c5f766d6a3030cd3 Mon Sep 17 00:00:00 2001 From: Zanie Date: Tue, 19 Dec 2023 13:06:52 -0600 Subject: [PATCH] Fix deserialization of index response when `requires_python` field is missing --- crates/pypi-types/src/simple_json.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pypi-types/src/simple_json.rs b/crates/pypi-types/src/simple_json.rs index 2d6352e13..3aed134dc 100644 --- a/crates/pypi-types/src/simple_json.rs +++ b/crates/pypi-types/src/simple_json.rs @@ -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, pub size: Option, pub upload_time: Option>,