ci: generate the coverage badge with genbadge - #358
Merged
Conversation
Changed Files
|
Contributor
setuptools 82.0.0 removed the bundled `pkg_resources`, and coverage-badge imports it at module scope, so the "Generate Coverage Badge" step dies with ModuleNotFoundError as soon as setuptools is bumped past 81. That is what fails dependabot's setuptools 83.0.0 PR (#347), which we want: GHSA-h35f-9h28-mq5c is only fixed in 83.0.0, so there is no version of setuptools that is both patched and compatible with coverage-badge. coverage-badge cannot be waited on — its last release is 1.1.2 from August 2024 and the upstream reports (dbrgn/coverage-badge#33, #35) are open and untouched. genbadge reads the same coverage.xml, emits the same shields-style SVG, and was last released in November 2025. Verified locally with setuptools 83.0.0 installed: badge generation, coverage-plot, `ty check ttc` and all 69 tests pass.
F1uctus
force-pushed
the
chore/replace-coverage-badge
branch
from
July 29, 2026 16:25
f49a5b1 to
e33f532
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks #347 (setuptools 80.10.1 → 83.0.0), which currently fails the Coverage job with
ModuleNotFoundError: No module named 'pkg_resources'.Why it cannot just be pinned around. setuptools removed the bundled
pkg_resourcesin 82.0.0, andcoverage_badge/__main__.pyimports it at module scope (pkg_resources.resource_stringfor its SVG template). The open advisory on this repo, GHSA-h35f-9h28-mq5c, is first patched in 83.0.0 — so no setuptools version is both patched and compatible with coverage-badge.Why not wait for upstream. coverage-badge's last release is 1.1.2 (August 2024); dbrgn/coverage-badge#33 ("
pkg_resourcesremoved from Setuptools in v82.0.0") and #35 are both open and untouched.genbadge reads the same
coverage.xml, writes the same shields-style SVG, and was last released 2025-11-24. The badge label goes fromcoverage 85%tocoverage: 84.67%— that is the only user-visible change.Verified locally with setuptools 83.0.0 actually installed: badge generation, the
coverage-plotstep,ty check ttc, and all 69 tests pass.Once this lands, #347 becomes redundant — the lock here already carries setuptools 83.0.0.
https://claude.ai/code/session_01CqqB29TdAZ183MjNnpkTFD