Skip to content

[Python] Support Protobuf 7.x - #40581

Open
sofiathoren wants to merge 4 commits into
apache:masterfrom
sofiathoren:support-protobuf-7
Open

sofiathoren wants to merge 4 commits into
apache:masterfrom
sofiathoren:support-protobuf-7

Conversation

@sofiathoren

@sofiathoren sofiathoren commented Oct 14, 2026 •

Copy link
Copy Markdown

Why? Currently Apache Beam pins protobuf<7.0.0.dev0 in sdks/python/setup.py. Protobuf 7.34.0 was released on February 27, 2026 (https://pypi.org/project/protobuf/7.34.0/, https://github.com/protocolbuffers/protobuf/releases/tag/v34.0), and downstream Google Cloud dependencies (google-api-core, proto-plus, grpcio-status, google-cloud-bigquery) now support protobuf<8.0.0.

Fixes #40580.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR updates the upper bound of the protobuf dependency in sdks/python/setup.py from <7.0.0.dev0 to <8.0.0.dev0 to allow Protobuf 7.x in the Python SDK. The change is clean, follows the precedent set for previous major Protobuf version bumps, and aligns with downstream Google Cloud dependencies.

🔍 General Feedback

  • The version constraint update is well-scoped and preserves existing exclusions for known problematic 4.x versions.
  • Consider adding a brief note in CHANGES.md if you'd like this dependency support expansion highlighted in the next release notes.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @shunping for label python.
Backup reviewer: claudevdm (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.93%. Comparing base (76f6e6d) to head (d5c155c).
⚠️ Report is 164 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #40581       +/-   ##
=============================================
+ Coverage     56.16%   79.93%   +23.76%     
=============================================
  Files          1124      488      -636     
  Lines        178336    82347    -95989     
  Branches       1489        0     -1489     
=============================================
- Hits         100170    65825    -34345     
+ Misses        75645    16522    -59123     
+ Partials       2521        0     -2521     
Flag Coverage Δ
go ?
java ?
python 79.93% <ø> (+0.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shunping shunping left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but similar rationale as #35477 (comment), we may want to do this after the coming release cut (10/18).

Also before we merge, let's add an entry to CHANGES.md.

@sofiathoren

Copy link
Copy Markdown
Author

@shunping thanks for review. I added an entry in CHANGES.md so please have a look once you get time over :)

@shunping

shunping commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

@shunping thanks for review. I added an entry in CHANGES.md so please have a look once you get time over :)

My mistake; the branch cut is actually on Oct 28. I will check back after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Support Protobuf 7.x in Python SDK

2 participants