Repository navigation
Fix tox -e build failing on Python 3.8–3.10 with "'2.5' is not a valid metadata version" - #386
annahedstroem with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: annahedstroem <29717021+annahedstroem@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The dependency bounds still permit validators that reject metadata 2.5, leaving older-Python compatibility unresolved.
1 open issue
What changed in this PR
Attempts to fix distribution validation failures on Python 3.8–3.10 by updating the tox build environment’s dependency requirements.
Changes:
- Requires
twine>=6.1.0. - Adds
packaging>=24.2.
| File | Description |
|---|---|
| tox.ini | Sets minimum validator dependency versions in the build environment. |
Review effort: Balanced
| twine>=6.1.0 | ||
| packaging>=24.2 |
There was a problem hiding this comment.
Constrained the isolated build backend to flit-core <3.11 so builds retain metadata compatible with the older Twine validator. Commit: 6f276b6. The configured distribution build could not run here because tox, build, and twine are unavailable.
Co-authored-by: annahedstroem <29717021+annahedstroem@users.noreply.github.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #386 +/- ##
=======================================
Coverage 89.35% 89.35%
=======================================
Files 67 67
Lines 4226 4226
=======================================
Hits 3776 3776
Misses 450 450 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@copilot can you make top-k tests deterministic by setting "k": 1500, instead of "k": 1250, in tests/metrics/test_localisation_metrics.py? |
Co-authored-by: annahedstroem <29717021+annahedstroem@users.noreply.github.com>
Changed the |
Co-authored-by: annahedstroem <29717021+annahedstroem@users.noreply.github.com>

On Python 3.8–3.10, CI passes the tests but fails at
twine check --strictwithInvalidDistribution: '2.5' is not a valid metadata version. The failure is unrelated to the docs-only change in #384.flit_corenow writes metadata 2.5, which the oldertwine/packagingthat tox installed on those Pythons cannot parse.tox.ini([testenv:build]): set minimum versionstwine>=6.1.0andpackaging>=24.2, so metadata 2.5 validates.Not verified locally or in CI.
twine6.1.0 may not install on Python 3.8, since it may require a newer Python. If the 3.8 job still fails, the alternative is to pinflit_coreto a version that emits older metadata.