Fix missing cp314 wheels on PyPI (#13949) - #14019
Open
bertonha wants to merge 1 commit into
Open
Conversation
The publish workflow used robinraju/release-downloader, which reads only the first page of a release's assets. GitHub paginates release assets at 30 per page, so for releases with 40 assets (v3.8.14, v3.8.15) the last 10 uploaded — all cp314 wheels, the cp313 win_arm64 wheel, and the sdist — were never fetched and thus never uploaded to PyPI, even though they were present on the GitHub release. This regressed when the action was pinned from the floating @v1 tag to a specific SHA (v1.12) for supply-chain hardening; v3.8.13, released before the pin, still got all 40 files. Replace the downloader with `gh release download`, which paginates correctly, and add a step that fails the job if the number of downloaded files doesn't match the release's asset count, so a partial upload can never silently reach PyPI again. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
Fixes #13949. The v3.8.14 and v3.8.15 GitHub releases each have 40 assets, but PyPI received only 30. The 10 missing files are exactly the last-uploaded batch:
cp314wheelscp313 win_arm64wheelsdist(.tar.gz)Root cause
publish_pypi.ymldownloaded release assets withrobinraju/release-downloader, which reads only the first page of a release's assets. GitHub paginates the release-assets listing at 30 per page (the endpoint returns aLink: …page=2header and only 30 items), so the tail was never fetched and never uploaded to PyPI — even though all 40 files are present on the GitHub release.This regressed when the action was pinned from the floating
@v1tag to a specific SHA (v1.12) for supply-chain hardening in 4216738. v3.8.13 was published before that pin and got all 40 files; v3.8.14 was the first release after it and lost the tail.Fix
gh release download, which paginates correctly (verified locally: it fetches all 40 assets, including every cp314 wheel and the sdist).Note
This workflow only runs on new release publications, so the already-affected v3.8.14/v3.8.15 wheels won't appear on PyPI retroactively — those need a one-off manual
gh release download+twine uploadof the missing files.🤖 Generated with Claude Code