-
-
Notifications
You must be signed in to change notification settings - Fork 640
fix: Bump minimum protobuf version to 31.0 to fix dropped 3.8 support #3446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
See jvolkman/rules_pycross#209 The old protobuf version still needs Python 3.8, so attempting to load it fails. I see there is already a PR here (bazel-contrib#3367) but this is a much smaller change for an isolated issue.
Summary of ChangesHello @Ahajha, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical compatibility issue by upgrading the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This change correctly bumps the protobuf version to address the Python 3.8 support issue, which is a good targeted fix. While reviewing, I noticed a related point in examples/bzlmod/py_proto_library/BUILD.bazel. There is a test named external_import_test which is marked as manual with a TODO comment: reenable when com_google_protobuf is upgraded. Since this PR upgrades com_google_protobuf, it would be a great addition to re-enable this test and ensure it passes with the new protobuf version. This would increase confidence in the upgrade.
MODULE.bazel
Outdated
| # Those are loaded only when using py_proto_library | ||
| # Use py_proto_library directly from protobuf repository | ||
| bazel_dep(name = "protobuf", version = "29.0-rc2", repo_name = "com_google_protobuf") | ||
| bazel_dep(name = "protobuf", version = "31.0-rc1", repo_name = "com_google_protobuf") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better maintainability, it would be helpful to add a comment explaining why this specific release candidate version of protobuf is being used. This provides context for future developers who might wonder about this version pin. Refactoring to a multi-line bazel_dep call would be a clean way to include this information.
bazel_dep(
name = "protobuf",
# Pinned to 31.0-rc1 to fix an issue with dropped Python 3.8 support.
# See: https://github.com/jvolkman/rules_pycross/issues/209
version = "31.0-rc1",
repo_name = "com_google_protobuf",
)
See jvolkman/rules_pycross#209
The old protobuf version still needs Python 3.8, so attempting to load it fails. I see there is already a PR here (#3367) but this is a much smaller change for an isolated issue.