fix(release): pin twine to 6.2.0 to fix PyPI upload metadata error - #230
Merged
Conversation
twine 5.1.1 bundles pkginfo, which cannot parse the Metadata-Version 2.4 files emitted by modern setuptools (unpinned in the release Makefile's venv target). pkginfo silently drops Name/Version, so twine upload rejects the wheel with "Metadata is missing required fields: Name, Version" (pypa/twine#1216) even though the built wheel is valid. twine>=6.1.0 replaced pkginfo with packaging for metadata validation, fixing this. 6.2.0 is used instead of the open dependabot PR's 7.0.0 bump, since 7.0.0 requires Python>=3.10 and breaks the Test(3.9) CI job.
prklm10
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Releaseworkflow run forv2.0.9-beta.0failed attwine uploadwithInvalidDistribution: Metadata is missing required fields: Name, Version.development.txtpinstwine==5.1.1, which bundlespkginfo— a package that can't parse theMetadata-Version: 2.4files emitted by the unpinned, latestsetuptoolsthe release Makefile installs.pkginfosilently dropsName/Version, so twine's own validation rejects an otherwise-valid wheel (upstream: Failed to upload artifacts to Test PyPI or PyPI - Invalid Distribution Metadata: unrecognized or malformed field: 'license-file' pypa/twine#1216).twine>=6.1.0droppedpkginfoin favor ofpackagingfor metadata validation, which correctly supports Metadata-Version 2.4. This bumps to6.2.0.7.0.0, which requires Python>=3.10 and breaks theTest (3.9)CI job.6.2.0fixes the release without breaking the supported Python matrix.Test plan
Releaseworkflow'smake releasestep succeeds and the package appears on PyPI