Skip to content

feat: add METADATA 2.6 support (PEP 808)#1194

Merged
henryiii merged 2 commits into
pypa:mainfrom
henryiii:henryiii/feat/pep-808
May 26, 2026
Merged

feat: add METADATA 2.6 support (PEP 808)#1194
henryiii merged 2 commits into
pypa:mainfrom
henryiii:henryiii/feat/pep-808

Conversation

@henryiii
Copy link
Copy Markdown
Contributor

@henryiii henryiii commented May 23, 2026

Should be an easy update here for PEP 808, just teaching packaging about the existence of METADATA 2.6.

🤖 Human guided, AI assisted PR (using this skill). AI text below. 🤖

Add support for METADATA 2.6 as defined by PEP 808 - Including static values in dynamic metadata. This PEP relaxes constraints on dynamic metadata by allowing static portions of list/table fields to be defined alongside dynamic metadata.

Since PEP 808 does not introduce any new metadata fields (only changes the semantic behavior of the Dynamic field in source distributions), the library only needs to recognize 2.6 as a valid metadata version.

Changes:

  • Add "2.6" to _VALID_METADATA_VERSIONS and _MetadataVersion
  • Add Metadata 2.6 comment in RawMetadata
  • Update test fixtures and examples to use 2.6
  • Update docs example to reference current version

Assisted-by: OpenCode:Kimi-K2.6

@henryiii henryiii force-pushed the henryiii/feat/pep-808 branch from c264f7e to a91069d Compare May 25, 2026 03:33
Copy link
Copy Markdown
Member

@brettcannon brettcannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have some test where reading metadata that falls under PEP 808 doesn't trigger an exception by having data and being listed in dynamic. Same goes for writing. Otherwise, if we ever decide to be more strict with dynamic we won't regress on PEP 808.

@henryiii henryiii force-pushed the henryiii/feat/pep-808 branch from a01df3e to 267b831 Compare May 26, 2026 14:17
@henryiii henryiii requested a review from brettcannon May 26, 2026 14:50
henryiii added 2 commits May 26, 2026 10:51
Add support for METADATA 2.6 as defined by PEP 808 - Including static values in
dynamic metadata. This PEP relaxes constraints on dynamic metadata by allowing
static portions of list/table fields to be defined alongside dynamic metadata.

Since PEP 808 does not introduce any new metadata fields (only changes the
semantic behavior of the Dynamic field in source distributions), the library only
needs to recognize 2.6 as a valid metadata version.

Changes:
- Add "2.6" to _VALID_METADATA_VERSIONS and _MetadataVersion
- Add Metadata 2.6 comment in RawMetadata
- Update test fixtures and examples to use 2.6
- Update docs example to reference current version

Assisted-by: OpenCode:NRP/kimi
Assisted-by: OpenCode:Kimi-K2.6
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii force-pushed the henryiii/feat/pep-808 branch from 267b831 to 1351523 Compare May 26, 2026 14:51
@henryiii henryiii merged commit 9f5249f into pypa:main May 26, 2026
58 checks passed
@henryiii henryiii deleted the henryiii/feat/pep-808 branch May 26, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants