Skip to content

fix: publish Python SDK again and fail the release when it does not - #485

Merged
jonas-jonas merged 1 commit into
masterfrom
jonas/python-release-setuptools
Sep 21, 2026
Merged

jonas-jonas merged 1 commit into
masterfrom
jonas/python-release-setuptools

Conversation

@jonas-jonas

@jonas-jonas jonas-jonas commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Python 3.12 venvs no longer ship setuptools, so setup.py crashed and twine had nothing to upload. The step still reported success: the function runs inside an || list, which disables errexit, and the trailing to_git call returned 0. PyPI has been stuck at 1.22.28 (2026-03-11) while client-python kept getting commits and tags.

Now installs setuptools, chains the build and upload with &&, and returns 1 on failure so the push to client-python is skipped and the job goes red.

The same masking pattern exists in the typescript, typescript-fetch, php and ruby functions. Left out of this PR.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved Python package release reliability by ensuring build and upload steps stop immediately when a command fails.
    • Release builds now create both source and wheel distributions.
    • Cleans previous distribution artifacts before building.
    • Includes all required build tooling for packaging.

Python 3.12 venvs no longer include setuptools, so setup.py crashed and
twine had nothing to upload. The failure was masked because the python
function runs inside an || list, which disables errexit, and the trailing
to_git call returned 0. PyPI has been stuck at 1.22.28 since March.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 49a7a70e-ee4c-4c1a-8e56-5478f9bc7626

📥 Commits

Reviewing files that changed from the base of the PR and between bc693c1 and 77c1166.

📒 Files selected for processing (1)
  • scripts/release.sh

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The release script now performs Python packaging and upload steps with fail-fast error handling. It installs both setuptools and wheel, removes dist, builds both distribution types, and returns failure when any step fails.

Changes

Release packaging

Layer / File(s) Summary
Fail-fast Python packaging and upload
scripts/release.sh
The Python release command removes dist, installs setuptools and wheel, builds source and wheel distributions, uploads them, and stops on failure.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 77c11

The Python release upload accepts the quoted artifact pattern and retains fail-fast failure handling, so this change is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Python SDK publishing fix and the release failure behavior.
Description check ✅ Passed The description explains the publishing failure, its cause, the implemented fix, and the related out-of-scope functions. It does not include the template checklist or further comments sections, but th…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jonas-jonas
jonas-jonas merged commit b46a6ea into master Sep 21, 2026
5 checks passed
@jonas-jonas
jonas-jonas deleted the jonas/python-release-setuptools branch September 21, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant