Skip to content

Commit

Permalink
Add PEP 714 support for JSON API client
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed May 21, 2024
1 parent 76418f5 commit c449d18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/pypi-types/src/simple_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ fn sorted_simple_json_files<'de, D: Deserializer<'de>>(d: D) -> Result<Vec<File>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct File {
// Non-PEP 691-compliant alias used by PyPI.
#[serde(alias = "data-dist-info-metadata")]
// PEP 714-renamed field, followed by PEP 691-compliant field, followed by non-PEP 691-compliant
// alias used by PyPI.
#[serde(alias = "data-core-metadata", alias = "dist-info-metadata", alias = "data-dist-info-metadata")]
pub dist_info_metadata: Option<DistInfoMetadata>,
pub filename: String,
pub hashes: Hashes,
Expand Down

0 comments on commit c449d18

Please sign in to comment.