Skip to content

chore: librarian update image pull request: 20260213T192444Z#1084

Merged
parthea merged 2 commits intomainfrom
librarian-20260213T192444Z
Feb 13, 2026
Merged

chore: librarian update image pull request: 20260213T192444Z#1084
parthea merged 2 commits intomainfrom
librarian-20260213T192444Z

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Feb 13, 2026

feat: update image to us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:a38add811f7f139d6a385b22d283ad09ef305b8cf50382ef62f0ce690787f021

…prod/images-prod/python-librarian-generator@sha256:a38add811f7f139d6a385b22d283ad09ef305b8cf50382ef62f0ce690787f021
@parthea parthea requested a review from a team as a code owner February 13, 2026 19:24
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: logging Issues related to the googleapis/python-logging API. labels Feb 13, 2026
@gemini-code-assist
Copy link
Contributor

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 a routine update of the python-librarian-generator image, alongside significant refactoring of Python import statements across the google-cloud-logging library. These import changes aim to standardize module referencing and improve compatibility with modern type-checking practices. Additionally, mypy configuration was enhanced to better manage import resolution and leverage incremental checks, contributing to overall code quality and developer experience.

Highlights

  • Librarian Image Update: The python-librarian-generator image used by the librarian tool has been updated to a new SHA256 hash: a38add811f7f139d6a385b22d283ad09ef305b8cf50382ef62f0ce690787f021.
  • Python Import Refactoring: Numerous Python files across google.cloud.logging_v2 services and types have had their import statements refactored. Direct from X import Y imports for protobuf and API core modules have been changed to import X.Y as Y for consistency and improved type hinting compatibility.
  • Mypy Configuration Enhancements: The mypy.ini configuration file has been updated to include ignore_missing_imports = False globally, with a specific override for google.iam.* modules. Additionally, explicit_package_bases = True and incremental = True were added to improve mypy's behavior and performance.
  • Service Account Client Refactoring: The from_service_account_info and from_service_account_file class methods in the async clients for ConfigServiceV2 and LoggingServiceV2 have been refactored to use an intermediate variable for the __func__ call, enhancing readability and potentially addressing type-checking nuances.
Changelog
  • .librarian/state.yaml
    • Updated the image field to a new SHA256 hash for the python-librarian-generator.
  • google/cloud/logging_v2/services/config_service_v2/async_client.py
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
    • Extracted the ConfigServiceV2Client.from_service_account_info.__func__ call into a local variable for improved readability.
    • Extracted the ConfigServiceV2Client.from_service_account_file.__func__ call into a local variable for improved readability.
  • google/cloud/logging_v2/services/config_service_v2/client.py
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
  • google/cloud/logging_v2/services/config_service_v2/transports/base.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/services/config_service_v2/transports/grpc.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/services/logging_service_v2/async_client.py
    • Refactored import statements from from X import Y to import X.Y as Y for monitored_resource_pb2.
    • Extracted the LoggingServiceV2Client.from_service_account_info.__func__ call into a local variable for improved readability.
    • Extracted the LoggingServiceV2Client.from_service_account_file.__func__ call into a local variable for improved readability.
  • google/cloud/logging_v2/services/logging_service_v2/client.py
    • Refactored import statements from from X import Y to import X.Y as Y for monitored_resource_pb2.
  • google/cloud/logging_v2/services/logging_service_v2/pagers.py
    • Refactored import statements from from X import Y to import X.Y as Y for monitored_resource_pb2.
  • google/cloud/logging_v2/services/logging_service_v2/transports/base.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/services/metrics_service_v2/async_client.py
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
    • Extracted the MetricsServiceV2Client.from_service_account_info.__func__ call into a local variable for improved readability.
    • Extracted the MetricsServiceV2Client.from_service_account_file.__func__ call into a local variable for improved readability.
  • google/cloud/logging_v2/services/metrics_service_v2/client.py
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
  • google/cloud/logging_v2/services/metrics_service_v2/transports/base.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py
    • Refactored import statements from from X import Y to import X.Y as Y for empty_pb2.
  • google/cloud/logging_v2/types/log_entry.py
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
  • google/cloud/logging_v2/types/logging.py
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
  • google/cloud/logging_v2/types/logging_config.py
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf modules.
  • google/cloud/logging_v2/types/logging_metrics.py
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
  • mypy.ini
    • Added ignore_missing_imports = False to the global mypy configuration.
    • Added a specific ignore_missing_imports = True for mypy-google.iam.*.
    • Added explicit_package_bases = True to help mypy navigate namespaces.
    • Added incremental = True for performance improvements.
  • tests/unit/gapic/logging_v2/test_config_service_v2.py
    • Added imports for Sequence and Mapping from collections.abc.
    • Removed direct from google.api_core import operation_async import.
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
  • tests/unit/gapic/logging_v2/test_logging_service_v2.py
    • Added imports for Sequence and Mapping from collections.abc.
    • Removed direct from google.api import monitored_resource_pb2 import.
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
  • tests/unit/gapic/logging_v2/test_metrics_service_v2.py
    • Added imports for Sequence and Mapping from collections.abc.
    • Removed direct from google.api import ... imports for several protobuf modules.
    • Refactored import statements from from X import Y to import X.Y as Y for various protobuf and API core modules.
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 updates the python-librarian-generator image and applies the resulting automated code changes. The modifications primarily involve refactoring for improved code quality and maintainability. Key changes include switching to a more explicit import style (import module as alias instead of from module import name), which enhances clarity, and breaking up long lines in factory methods for better readability. Additionally, the mypy.ini configuration has been updated to enforce stricter type checking. These changes are applied consistently and represent good practice. I find no issues with this update.

@parthea parthea enabled auto-merge (squash) February 13, 2026 20:17
@parthea parthea added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Feb 13, 2026
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Feb 13, 2026
@parthea parthea merged commit 35b5391 into main Feb 13, 2026
14 checks passed
@parthea parthea deleted the librarian-20260213T192444Z branch February 13, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: logging Issues related to the googleapis/python-logging API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants