Repository navigation
Commit c958e40
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments