Skip to content

Commit c958e40

Browse files
authored
fix(build): upgrade twine to >=7.0.0 to support Metadata-Version 2.5 (#1100)
## Problem The `Run twine check` CI step fails on all PRs (e.g. run [31887608422](https://github.com/testcontainers/testcontainers-python/actions/runs/31887608422/job/95019090461?pr=1090) on #1090) with: ``` 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 and original tracking issue: #1096. ## Fix `hatchling` emits `Metadata-Version: 2.5` in built wheel/sdist metadata. Rather than pinning `hatchling` back to an older version (as done in #1095), this upgrades `twine` to `>=7.0.0`, which officially added support for Metadata-Version 2.5, fixing the root cause instead of working around it. Supersedes #1095 as the preferred fix. ## Verification Ran locally: ``` uv build && uv run twine check dist/* ``` Wheel METADATA shows `Metadata-Version: 2.5` (hatchling unpinned), and both wheel and sdist pass `twine check` (`PASSED`).
1 parent ad32c78 commit c958e40

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ test = [
134134
"sqlalchemy-cockroachdb>=2",
135135
"sqlalchemy-cratedb",
136136
"paramiko>=4",
137-
"twine>=6.2.0",
137+
"twine>=7.0.0",
138138
"anyio>=4",
139139
"tomli>=2.0; python_version < '3.11'", # required for pyproject.toml tests, TODO: remove once we drop py3.10 support
140140
"pytest-xdist>=3.8.0",

‎uv.lock‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)