You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI: twine check fails with 'Invalid distribution metadata: 2.5 is not a valid metadata version' #1096
The Run twine check step in the run-tests-and-coverage CI job fails on every PR build (e.g. run 31887608422 on #1090):
Checking dist/testcontainers-4.15.0-py3-none-any.whl: ERROR InvalidDistribution: Invalid distribution metadata: '2.5' is not a valid metadata version
Root cause
hatchling>=1.32 now emits Metadata-Version: 2.5 in built wheel/sdist metadata. The pinned twine (6.2.0, via packaging) doesn't yet recognize 2.5 as valid and rejects the distribution during twine check. This is unrelated to any individual PR's diff — it's caused by an unpinned build-backend version picking up a newer hatchling release. See upstream: pypa/twine#1327.
Fix
Pinning hatchling to >=1.26,<1.32 in pyproject.toml's [build-system] keeps it emitting Metadata-Version: 2.4, compatible with the current twine/packaging toolchain.
Activity
fix(build): upgrade twine to >=7.0.0 to support Metadata-Version 2.5 (#…
fix(build): pin hatchling <1.32 to fix twine check CI failure (testco…