Repository navigation
CI: pin flit_core with flit in the PyPI publish job; allow publishing a tag by manual dispatch - #974
Merged
Merged
Conversation
…lish flit~=3.6 resolves to flit 3.12.0, which requires only flit_core>=3.12 with no upper bound, so pip now pairs it with flit_core 4.1.0 and `flit publish` fails with a TypeError on gen_setup_py. Pin both to the 3.12 series. Add a workflow_dispatch `ref` input so an existing tag can be published from main without re-tagging. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The publish workflow logic needs adjustment to avoid context/evaluation pitfalls and to better constrain/align what gets published vs what gets tested.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This PR updates the CI workflow to (1) prevent PyPI publish failures caused by an incompatible flit/flit_core resolver combination, and (2) enable manually publishing an already-existing tag (e.g., v0.12.0) without recreating the tag/release.
Changes:
- Add a
workflow_dispatchtrigger with a requiredrefinput for manually publishing an existing tag. - Update the publish job to run on manual dispatch and to check out the requested ref.
- Pin
flitandflit_coreto the 3.x series to avoid thegen_setup_pyincompatibility withflit_core4.x.
| File | Description |
|---|---|
| .github/workflows/ci.yml | Adds manual dispatch publishing support and pins flit/flit_core to keep PyPI publishing stable. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Check out the dispatch input as refs/tags/<name> so a branch name or SHA cannot resolve and a missing tag fails the checkout step. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Merged
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.

The v0.12.0 tag run (35960284940) passed every test job and then failed in "Publish to PyPi" before uploading anything:
TypeError: SdistBuilder.build() got an unexpected keyword argument 'gen_setup_py'. PyPI still lists 0.11.4 as latest with no 0.12.0 files, so nothing is burned.Cause. The job installs
flit~=3.6, which resolves to flit 3.12.0. That release requires onlyflit_core>=3.12.0with no upper bound, so pip paired it with flit_core 4.1.0 (released 16 September 2026; the 4.0 series began on 4 August, after the v0.11.4 publish in July). flit 3.12 still passesgen_setup_pytoSdistBuilder.build(), which flit_core 4 removed.Fix. Install
flit~=3.12andflit_core~=3.12together so both stay in the 3.x series that has published this package until now. Moving to flit 4 is a separate decision.Re-publishing the existing tag. A rerun of the failed job uses the workflow as of the tag, so it would fail the same way. Rather than delete and recreate the tag and release, this adds a
workflow_dispatchtrigger with arefinput, and the publish job checks out that ref. After this merges, running the workflow frommainwithref=v0.12.0builds and uploads 0.12.0 from the tagged commit:The tests job still gates publish; on a dispatch it runs against
main.Follow-up worth its own issue. Switching the job to
pypa/gh-action-pypi-publishwith trusted publishing would remove both the pip pins and the long-livedPYPI_TOKENsecret.🤖 Generated with Claude Code