Skip to content

Conversation

@daniel-sanche
Copy link
Contributor

Update protobuf dependencies to only use actively supported versions

EOL Python versions need to use EOL protobuf versions

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jan 8, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @daniel-sanche, 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 refines the protobuf dependency management within the project's setup.py files. The primary goal is to ensure that all Python environments, from older EOL versions to the latest supported ones, are provided with appropriate and compatible protobuf library versions. This is achieved by introducing conditional dependency declarations, which dynamically select the correct protobuf range based on the Python interpreter version being used, thereby enhancing stability and preventing potential compatibility issues.

Highlights

  • Conditional Protobuf Dependencies: The protobuf dependency specification has been updated to be conditional on the Python version, ensuring that each Python environment uses a compatible and supported protobuf version.
  • Support for EOL Python Versions: Older, end-of-life Python versions (e.g., 3.7, 3.8, 3.9) are now explicitly pinned to specific protobuf versions that are compatible, even if those protobuf versions are also end-of-life, as per the PR description.
  • Updated Protobuf Versions for Modern Python: For Python versions 3.10 and above, the protobuf dependency is now set to protobuf>=6.0.0,<7.0.0, aligning with actively supported versions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 pull request aims to update protobuf dependencies to supported versions, which is a good initiative. However, the current implementation has a few critical issues that could break package installation for users.

My review identifies three main problems:

  1. The new constraint for Python 3.7 re-introduces previously excluded vulnerable protobuf versions.
  2. The constraint for Python 3.10+ references a non-existent protobuf version (6.0.0), which will cause installation failures.
  3. Several constraints lack upper bounds, making them fragile to future protobuf releases with breaking changes.

I've provided specific suggestions on the gapic/templates/setup.py.j2 template file to address these issues. Once the template is fixed, the generated golden files should be updated accordingly.

@daniel-sanche daniel-sanche added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kokoro:force-run Add this label to force Kokoro to re-run the tests. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant