Skip to content

Conversation

@Ahajha
Copy link
Contributor

@Ahajha Ahajha commented Dec 7, 2025

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.

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.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 protobuf dependency to a newer version. The previous protobuf release no longer supported Python 3.8, leading to runtime errors. By bumping the version to 31.0-rc1, this change ensures continued compatibility with Python 3.8 environments, providing a targeted fix for the reported problem.

Highlights

  • Protobuf Version Update: The protobuf dependency has been updated from version 29.0-rc2 to 31.0-rc1 in the MODULE.bazel file.
  • Python 3.8 Compatibility Fix: This change specifically addresses an issue where the older protobuf version dropped support for Python 3.8, causing failures when attempting to load it.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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")
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

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",
)

@Ahajha Ahajha changed the title fix: Bump minimum protobuf version to 31.0-rc1 to fix dropped 3.8 support fix: Bump minimum protobuf version to 31.0 to fix dropped 3.8 support Dec 7, 2025
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.

2 participants