Skip to content

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Jan 22, 2026

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

@parthea parthea requested a review from a team as a code owner January 22, 2026 18:58
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: logging Issues related to the googleapis/python-logging API. labels Jan 22, 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 updating the core python-librarian-generator Docker image and aligning the development environment to Python 3.14. Additionally, it includes a minor refactoring in the Google Cloud Logging client libraries to streamline how authentication scopes are handled during credential initialization.

Highlights

  • Librarian Image Update: The python-librarian-generator Docker image has been updated to a new SHA256 hash, ensuring the use of the latest version of the generator.
  • Python Version Upgrade: Development and type-checking configurations have been updated to target Python 3.14, specifically in noxfile.py for the blacken session and in mypy.ini.
  • Authentication Refactoring: The Google Cloud Logging client transports (Config, Logging, and Metrics services) have been refactored to explicitly pass authentication scope arguments during credential loading, removing an intermediate scopes_kwargs dictionary.
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 includes routine updates to Python versions across various configuration files (noxfile.py, mypy.ini) and a Docker image SHA. Additionally, it refactors credential loading in the base.py transport files by explicitly passing scopes and default_scopes instead of using an intermediate scopes_kwargs dictionary. These changes are positive, contributing to better maintainability by keeping dependencies up-to-date and improving code clarity.

Comment on lines 94 to 95
# Save the scopes.
self._scopes = scopes
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The removal of the scopes_kwargs dictionary simplifies the code by eliminating an unnecessary intermediate variable. This improves readability and directly passes the required arguments.

Comment on lines 94 to 95
# Save the scopes.
self._scopes = scopes
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The removal of the scopes_kwargs dictionary simplifies the code by eliminating an unnecessary intermediate variable. This improves readability and directly passes the required arguments.

Comment on lines 94 to 95
# Save the scopes.
self._scopes = scopes
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The removal of the scopes_kwargs dictionary simplifies the code by eliminating an unnecessary intermediate variable. This improves readability and directly passes the required arguments.

@parthea
Copy link
Contributor Author

parthea commented Jan 22, 2026

Latest failure

        if PROTOBUF_VERSION[0] in ("3", "4"):
            return MessageToDict(
                cls.pb(instance),
                including_default_value_fields=print_fields,
                preserving_proto_field_name=preserving_proto_field_name,
                use_integers_for_enums=use_integers_for_enums,
                float_precision=float_precision,
            )
        else:
            # The `including_default_value_fields` argument was removed from protobuf 5.x
            # and replaced with `always_print_fields_with_no_presence` which very similar but has
            # handles optional fields consistently by not affecting them.
            # The old flag accidentally had inconsistent behavior between proto2
            # optional and proto3 optional fields.
>           return MessageToDict(
                cls.pb(instance),
                always_print_fields_with_no_presence=print_fields,
                preserving_proto_field_name=preserving_proto_field_name,
                use_integers_for_enums=use_integers_for_enums,
                float_precision=float_precision,
            )
E           TypeError: MessageToDict() got an unexpected keyword argument 'float_precision'

@parthea
Copy link
Contributor Author

parthea commented Jan 22, 2026

The failure in #1076 (comment) for presubmit Kokoro Prerelease Dependencies is due to googleapis/proto-plus-python#558

@parthea parthea merged commit 78de0d5 into main Jan 22, 2026
15 of 16 checks passed
@parthea parthea deleted the librarian-20260122T185811Z branch January 22, 2026 21:49
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: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants