Skip to content

🐛 fix(ci): bump build-and-inspect-python-package to v3.0.1 - #1147

Merged
henryiii merged 1 commit into
pypa:mainfrom
gaborbernat:fix-metadata-25-check
Aug 12, 2026
Merged

henryiii merged 1 commit into
pypa:mainfrom
gaborbernat:fix-metadata-25-check

Conversation

@gaborbernat

Copy link
Copy Markdown
Contributor

The "Build distribution" check fails on every PR since August 10, for example in run 31618820590, 31589143829, and 31574411778. flit-core 4.0 now writes Metadata-Version: 2.5 (PEP 794), and the twine 6.2.0 bundled in build-and-inspect-python-package v2.18.0 rejects it with InvalidDistribution: Invalid distribution metadata: '2.5' is not a valid metadata version. The bundled packaging 26.2 does know 2.5, but twine 6.2.0 overwrites packaging.metadata._VALID_METADATA_VERSIONS with a hardcoded list that stops at 2.4, so the check fails regardless.

Twine 7.0.0 dropped that override, and build-and-inspect-python-package v3.0.0 bundles it, with the changelog naming metadata 2.5 and PEP 794 support as the reason. This bumps the pin to v3.0.1, the latest release. Note that starting with v3 the action no longer force-pushes major version tags, so future bumps keep coming through the pinned commit hash as before.

Verified locally: uv build on this branch produces a wheel with Metadata-Version: 2.5, twine check --strict with twine 6.2.0 plus packaging 26.2 (the v2.18.0 pins) reproduces the error, and twine 7.0.0 with the same packaging passes for both the sdist and the wheel.

flit-core 4.0 writes Metadata-Version 2.5, which the twine 6.2.0
bundled in v2.18.0 rejects. v3.0.1 bundles twine 7.0.0, which
accepts it.
@gaborbernat gaborbernat added the bug Something isn't working label Aug 12, 2026
@gaborbernat gaborbernat added the bug Something isn't working label Aug 12, 2026

@henryiii henryiii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes. I wish there had been more of a delay in hatchling bumping to metadata 2.5 after twine updates.

@henryiii
henryiii merged commit 7519c9d into pypa:main Aug 12, 2026
10 checks passed
@henryiii

Copy link
Copy Markdown
Contributor

By the way, you can also just manually trigger Dependabot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants