THRIFT-6070: Publish Python wheel distributions to PyPI#3598
Open
HTHou wants to merge 1 commit into
Open
Conversation
Client: py Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Apache Thrift’s Python release process to use GitHub Actions with PyPI Trusted Publishing, and documents the new workflow-driven publishing steps.
Changes:
- Replaces manual PyPI upload guidance with workflow-based Trusted Publishing instructions.
- Splits PyPI workflow into separate sdist and multi-platform wheel build jobs, then publishes from a dedicated job.
- Adds PR/workflow_dispatch triggers to validate packaging changes without publishing.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| doc/ReleaseManagement.md | Documents the new PyPI publishing workflow and verification steps for artifacts and Trusted Publishing. |
| .github/workflows/pypi.yml | Implements sdist + wheel builds, gates publishing on release events, and publishes via Trusted Publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+25
to
+27
| pull_request: | ||
| branches: | ||
| - master |
| needs: | ||
| - build-sdist | ||
| - build-wheels | ||
| if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} |
Comment on lines
+435
to
+436
| * [pypi] The `PyPI publishing` GitHub Actions workflow publishes the Python | ||
| package when the GitHub release is published. It builds the source |
Member
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
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.
What changed
This updates the PyPI release workflow to build and publish Python wheel distributions in addition to the existing source distribution.
The workflow now:
python -m buildand validates it withtwine checkcibuildwheelThe release management notes now describe the automated PyPI publishing path and the expected artifacts.
Why
PyPI releases for the Python
thriftpackage currently publish only an sdist, so users without a matching prebuilt wheel must build locally. This adds wheel artifacts while keeping the sdist path intact.Validation
.github/workflows/pypi.ymlas YAMLgit diff --checklib/pysdist in a temporary directory withpython -m build --sdisttwine checkon the generated sdistcibuildwheel==4.1.0 --print-build-identifiersselects the expected CPython 3.10-3.14 targets for Linux, macOS, and WindowsFull multi-platform wheel builds are expected to run in GitHub Actions.
Licensing
cibuildwheelis used as a CI build-time tool and is BSD-2-Clause licensed, which is compatible with Apache License 2.0. No new runtime dependency is added.AI assistance
Co-Authored-By: Codex noreply@openai.com