Description
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.
Fixed in #1095.
Description
The
Run twine checkstep in therun-tests-and-coverageCI job fails on every PR build (e.g. run 31887608422 on #1090):Root cause
hatchling>=1.32now emitsMetadata-Version: 2.5in built wheel/sdist metadata. The pinnedtwine(6.2.0, viapackaging) doesn't yet recognize2.5as valid and rejects the distribution duringtwine 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
hatchlingto>=1.26,<1.32inpyproject.toml's[build-system]keeps it emittingMetadata-Version: 2.4, compatible with the current twine/packaging toolchain.Fixed in #1095.