Skip to content

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Dec 16, 2025

chore: librarian update image pull request: 20251216T200852Z

…prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209
@parthea parthea requested review from a team as code owners December 16, 2025 20:08
@product-auto-label product-auto-label bot added the size: xl Pull request size is extra large. label Dec 16, 2025
@product-auto-label product-auto-label bot added the api: datastore Issues related to the googleapis/python-datastore API. label Dec 16, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @parthea, 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 primarily focuses on maintenance and compatibility improvements. It updates the core librarian generator image, removes obsolete code, and enhances the client libraries with better Python version and dependency checks. Additionally, it refactors the mTLS client certificate handling for improved clarity and robustness, along with corresponding test updates.

Highlights

  • Librarian Image Update: The python-librarian-generator image used for the project has been updated to a new SHA256 hash, ensuring the use of the latest generator version.
  • Removal of Legacy Fixup Scripts: Two old Python scripts, fixup_datastore_v1_keywords.py and fixup_datastore_admin_v1_keywords.py, which were previously used for keyword fixes, have been removed from the project and their references in setup.py.
  • Python Version and Dependency Checks: New runtime checks have been introduced in the __init__.py files for google.cloud.datastore_admin_v1 and google.cloud.datastore_v1 to warn users about unsupported Python versions and outdated google.protobuf dependencies, improving compatibility guidance.
  • mTLS Client Certificate Handling Refactor: The logic for determining the effective use of mTLS client certificates has been refactored into a new static method _use_client_cert_effective within the Datastore and DatastoreAdmin clients. This centralizes the decision-making process, supporting both google-auth's should_use_client_cert and fallback to environment variables.
  • File Renames: The owlbot.py files in both the root directory and .librarian/generator-input/ have been renamed to librarian.py, standardizing the naming convention for librarian-related scripts.
  • Test Enhancements: Unit tests for mTLS client certificate handling have been updated and expanded to cover the new _use_client_cert_effective logic and various environment variable scenarios.
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

@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 is an automated update from the librarian tool. It updates the generator image and applies several changes across the codebase. Key changes include:

  • Removal of legacy fixup scripts.
  • Addition of Python version and dependency checks in the __init__.py files of the client libraries to warn users about outdated environments.
  • Refactoring of the mTLS client certificate handling logic into a shared helper method for better code reuse and maintainability.
  • Corresponding updates to unit tests to cover the new logic and remove obsolete tests.

The changes are generally good and improve the library's robustness and maintainability. I've added a few minor suggestions to improve the readability of the new warning messages.

Comment on lines +72 to +76
"You are using a non-supported Python version "
+ f"({_py_version_str}). Google will not post any further "
+ f"updates to {_package_label} supporting this Python version. "
+ "Please upgrade to the latest Python version, or at "
+ f"least to Python 3.9, and then update {_package_label}.",

Choose a reason for hiding this comment

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

medium

The warning message is constructed using a mix of string concatenation with + and an f-string. This can be simplified into a single multi-line string using implicit concatenation for better readability.

                ("You are using a non-supported Python version "
                f"({_py_version_str}).  Google will not post any further "
                f"updates to {_package_label} supporting this Python version. "
                "Please upgrade to the latest Python version, or at "
                f"least to Python 3.9, and then update {_package_label}.")

Comment on lines +81 to +86
f"You are using a Python version ({_py_version_str}) "
+ f"which Google will stop supporting in {_package_label} in "
+ "January 2026. Please "
+ "upgrade to the latest Python version, or at "
+ "least to Python 3.10, before then, and "
+ f"then update {_package_label}.",

Choose a reason for hiding this comment

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

medium

The warning message is constructed using a mix of string concatenation with + and an f-string. This can be simplified into a single multi-line string using implicit concatenation for better readability.

                (f"You are using a Python version ({_py_version_str}) "
                f"which Google will stop supporting in {_package_label} in "
                "January 2026. Please "
                "upgrade to the latest Python version, or at "
                "least to Python 3.10, before then, and "
                f"then update {_package_label}.")

Comment on lines +127 to +138
f"Package {_package_label} depends on "
+ f"{_dependency_package}, currently installed at version "
+ f"{_version_used_string}. Future updates to "
+ f"{_package_label} will require {_dependency_package} at "
+ f"version {_next_supported_version} or higher{_recommendation}."
+ " Please ensure "
+ "that either (a) your Python environment doesn't pin the "
+ f"version of {_dependency_package}, so that updates to "
+ f"{_package_label} can require the higher version, or "
+ "(b) you manually update your Python environment to use at "
+ f"least version {_next_supported_version} of "
+ f"{_dependency_package}.",

Choose a reason for hiding this comment

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

medium

The warning message is constructed using a mix of string concatenation with + and an f-string. This can be simplified into a single multi-line string using implicit concatenation for better readability.

                (f"Package {_package_label} depends on "
                f"{_dependency_package}, currently installed at version "
                f"{_version_used_string}. Future updates to "
                f"{_package_label} will require {_dependency_package} at "
                f"version {_next_supported_version} or higher{_recommendation}."
                " Please ensure "
                "that either (a) your Python environment doesn't pin the "
                f"version of {_dependency_package}, so that updates to "
                f"{_package_label} can require the higher version, or "
                "(b) you manually update your Python environment to use at "
                f"least version {_next_supported_version} of "
                f"{_dependency_package}.")

Comment on lines +98 to +102
"You are using a non-supported Python version "
+ f"({_py_version_str}). Google will not post any further "
+ f"updates to {_package_label} supporting this Python version. "
+ "Please upgrade to the latest Python version, or at "
+ f"least to Python 3.9, and then update {_package_label}.",

Choose a reason for hiding this comment

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

medium

The warning message is constructed using a mix of string concatenation with + and an f-string. This can be simplified into a single multi-line string using implicit concatenation for better readability.

                ("You are using a non-supported Python version "
                f"({_py_version_str}).  Google will not post any further "
                f"updates to {_package_label} supporting this Python version. "
                "Please upgrade to the latest Python version, or at "
                f"least to Python 3.9, and then update {_package_label}.")

Comment on lines +107 to +112
f"You are using a Python version ({_py_version_str}) "
+ f"which Google will stop supporting in {_package_label} in "
+ "January 2026. Please "
+ "upgrade to the latest Python version, or at "
+ "least to Python 3.10, before then, and "
+ f"then update {_package_label}.",

Choose a reason for hiding this comment

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

medium

The warning message is constructed using a mix of string concatenation with + and an f-string. This can be simplified into a single multi-line string using implicit concatenation for better readability.

                (f"You are using a Python version ({_py_version_str}) "
                f"which Google will stop supporting in {_package_label} in "
                "January 2026. Please "
                "upgrade to the latest Python version, or at "
                "least to Python 3.10, before then, and "
                f"then update {_package_label}.")

Comment on lines +153 to +164
f"Package {_package_label} depends on "
+ f"{_dependency_package}, currently installed at version "
+ f"{_version_used_string}. Future updates to "
+ f"{_package_label} will require {_dependency_package} at "
+ f"version {_next_supported_version} or higher{_recommendation}."
+ " Please ensure "
+ "that either (a) your Python environment doesn't pin the "
+ f"version of {_dependency_package}, so that updates to "
+ f"{_package_label} can require the higher version, or "
+ "(b) you manually update your Python environment to use at "
+ f"least version {_next_supported_version} of "
+ f"{_dependency_package}.",

Choose a reason for hiding this comment

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

medium

The warning message is constructed using a mix of string concatenation with + and an f-string. This can be simplified into a single multi-line string using implicit concatenation for better readability.

                (f"Package {_package_label} depends on "
                f"{_dependency_package}, currently installed at version "
                f"{_version_used_string}. Future updates to "
                f"{_package_label} will require {_dependency_package} at "
                f"version {_next_supported_version} or higher{_recommendation}."
                " Please ensure "
                "that either (a) your Python environment doesn't pin the "
                f"version of {_dependency_package}, so that updates to "
                f"{_package_label} can require the higher version, or "
                "(b) you manually update your Python environment to use at "
                f"least version {_next_supported_version} of "
                f"{_dependency_package}.")

@parthea parthea enabled auto-merge (squash) December 16, 2025 20:12
@parthea parthea changed the title chore: librarian update image pull request: 20251216T200852Z feat(gapic): support mTLS certificates when available Dec 16, 2025
@parthea parthea disabled auto-merge December 16, 2025 20:13
@parthea parthea merged commit 85c0232 into main Dec 16, 2025
22 of 26 checks passed
@parthea parthea deleted the librarian-20251216T200852Z branch December 16, 2025 20:15
daniel-sanche added a commit that referenced this pull request Dec 16, 2025
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.7.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209
<details><summary>google-cloud-datastore: 2.23.0</summary>

##
[2.23.0](v2.22.0...v2.23.0)
(2025-12-16)

### Features

* support mTLS certificates when available (#658)
([85c0232](85c02328))

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

Labels

api: datastore Issues related to the googleapis/python-datastore API. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants