From 7242c428e7ca9eaa7bc78fdc85c6c5b95ac72ff0 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 22 Jan 2026 18:54:33 +0000 Subject: [PATCH 1/5] chore: bump python version used for blacken session --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 3331fd35..51d0c48b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -120,7 +120,7 @@ def lint(session): session.run("flake8", "google", "tests") -@nox.session(python="3.13") +@nox.session(python=DEFAULT_PYTHON_VERSION) def blacken(session): """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) From c569d34a9743aaabe6e58a4f174b3bd1d2e38324 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 22 Jan 2026 18:55:37 +0000 Subject: [PATCH 2/5] also bump in .librarian/generator-input/noxfile.py --- .librarian/generator-input/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.librarian/generator-input/noxfile.py b/.librarian/generator-input/noxfile.py index 16dca84d..7d1fed58 100644 --- a/.librarian/generator-input/noxfile.py +++ b/.librarian/generator-input/noxfile.py @@ -116,7 +116,7 @@ def lint(session): session.run("flake8", "google", "tests") -@nox.session(python="3.13") +@nox.session(python="3.14") def blacken(session): """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) From 5734709a2ffc4912f89a12aa55d8f64cacc07c89 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 22 Jan 2026 18:58:12 +0000 Subject: [PATCH 3/5] feat: update image to us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:e7cc6823efb073a8a26e7cefdd869f12ec228abfbd2a44aa9a7eacc284023677 --- .librarian/state.yaml | 2 +- .../services/config_service_v2/transports/base.py | 11 +++++++---- .../services/logging_service_v2/transports/base.py | 11 +++++++---- .../services/metrics_service_v2/transports/base.py | 11 +++++++---- mypy.ini | 2 +- noxfile.py | 2 +- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 5013625b..5ce6be53 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -1,4 +1,4 @@ -image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209 +image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:e7cc6823efb073a8a26e7cefdd869f12ec228abfbd2a44aa9a7eacc284023677 libraries: - id: google-cloud-logging version: 3.13.0 diff --git a/google/cloud/logging_v2/services/config_service_v2/transports/base.py b/google/cloud/logging_v2/services/config_service_v2/transports/base.py index cbe76169..c0d1b0a9 100644 --- a/google/cloud/logging_v2/services/config_service_v2/transports/base.py +++ b/google/cloud/logging_v2/services/config_service_v2/transports/base.py @@ -91,8 +91,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -107,11 +105,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/google/cloud/logging_v2/services/logging_service_v2/transports/base.py b/google/cloud/logging_v2/services/logging_service_v2/transports/base.py index 881a6df3..39bf318f 100644 --- a/google/cloud/logging_v2/services/logging_service_v2/transports/base.py +++ b/google/cloud/logging_v2/services/logging_service_v2/transports/base.py @@ -91,8 +91,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -107,11 +105,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py b/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py index 22aad679..c8c0f539 100644 --- a/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py +++ b/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py @@ -91,8 +91,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -107,11 +105,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/mypy.ini b/mypy.ini index 574c5aed..a3cb5c29 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/noxfile.py b/noxfile.py index 51d0c48b..d3b7cf59 100644 --- a/noxfile.py +++ b/noxfile.py @@ -120,7 +120,7 @@ def lint(session): session.run("flake8", "google", "tests") -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python="3.14") def blacken(session): """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) From 6f7639c9fd27830de2cfcc3fec965719b18b23ec Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 22 Jan 2026 14:07:51 -0500 Subject: [PATCH 4/5] apply fix from https://github.com/googleapis/gapic-generator-python/pull/2527 --- testing/constraints-3.7.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index 11300488..9ec19f78 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -5,6 +5,8 @@ # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 google-api-core==1.34.1 +# cryptography is a direct dependency of google-auth +cryptography==38.0.3 google-auth==2.14.1 proto-plus==1.22.0 protobuf==3.20.2 From 7e51aa905c186fce85efea2a6987e66c0a8d485b Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 22 Jan 2026 15:21:19 -0500 Subject: [PATCH 5/5] Apply fix from https://github.com/googleapis/gapic-generator-python/pull/2527 --- testing/constraints-3.9.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index 10c5cba8..fc910aba 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -3,6 +3,8 @@ # List all library dependencies and extras in this file. google-api-core google-auth +# cryptography is a direct dependency of google-auth +cryptography==38.0.3 proto-plus protobuf google-cloud-core