From 17bd11a68b4e0988b5d0341734bd456cf91c576c Mon Sep 17 00:00:00 2001 From: Heba Alazzeh Date: Fri, 7 Aug 2026 02:20:27 +0000 Subject: [PATCH 1/8] update post processing scripts --- .../add-dependency-google-cloud-common.yaml | 4 +- ...-dependencies-to-setup-py-constraints.yaml | 24 ++++---- .../asset-integration.yaml | 8 +-- .../bigquery-storage-integration.yaml | 59 +++++++++---------- .../bigtable-integration.yaml | 4 +- ...containeranalysis-grafeas-integration.yaml | 4 +- .../integrate-isolated-handwritten-code.yaml | 12 ++-- .../remove-unused-imports.yaml | 33 ----------- .../spanner-integration.yaml | 2 +- .../storage-integration.yaml | 2 +- .../temporary-post-processing.yaml | 27 --------- 11 files changed, 59 insertions(+), 120 deletions(-) delete mode 100644 .librarian/generator-input/client-post-processing/remove-unused-imports.yaml delete mode 100644 .librarian/generator-input/client-post-processing/temporary-post-processing.yaml diff --git a/.librarian/generator-input/client-post-processing/add-dependency-google-cloud-common.yaml b/.librarian/generator-input/client-post-processing/add-dependency-google-cloud-common.yaml index 9072b178e1ae..90d666185fbe 100644 --- a/.librarian/generator-input/client-post-processing/add-dependency-google-cloud-common.yaml +++ b/.librarian/generator-input/client-post-processing/add-dependency-google-cloud-common.yaml @@ -19,14 +19,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/.librarian/generator-input/client-post-processing/add-missing-dependencies-to-setup-py-constraints.yaml b/.librarian/generator-input/client-post-processing/add-missing-dependencies-to-setup-py-constraints.yaml index 487d05b400e8..255bba70d113 100644 --- a/.librarian/generator-input/client-post-processing/add-missing-dependencies-to-setup-py-constraints.yaml +++ b/.librarian/generator-input/client-post-processing/add-missing-dependencies-to-setup-py-constraints.yaml @@ -19,14 +19,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", @@ -38,14 +38,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", @@ -57,14 +57,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", @@ -76,14 +76,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", @@ -95,14 +95,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", @@ -114,14 +114,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/.librarian/generator-input/client-post-processing/asset-integration.yaml b/.librarian/generator-input/client-post-processing/asset-integration.yaml index 06dd54b48f1a..ca0f441e759c 100644 --- a/.librarian/generator-input/client-post-processing/asset-integration.yaml +++ b/.librarian/generator-input/client-post-processing/asset-integration.yaml @@ -19,14 +19,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", @@ -38,10 +38,10 @@ replacements: packages/google-cloud-asset/testing/constraints-3.10.txt ] before: | - google-api-core==2.25.0 + google-api-core==2.28.0 google-auth==2.14.1 after: | - google-api-core==2.25.0 + google-api-core==2.28.0 google-cloud-org-policy==1.13.1 google-auth==2.14.1 count: 1 diff --git a/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml b/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml index cfe5da12f41f..159e96e24c9a 100644 --- a/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml @@ -470,44 +470,28 @@ replacements: This package includes clients for multiple versions of BigQuery Storage. By default, you will get version ``bigquery_storage_v1``.\n\n API Reference - ------------- - .. toctree:: - :maxdepth: 2\n - bigquery_storage_v1/services_ - bigquery_storage_v1/types_\n - API Reference - ------------- - .. toctree:: - :maxdepth: 2\n - bigquery_storage_v1alpha/services_ - bigquery_storage_v1alpha/types_\n - API Reference - ------------- - .. toctree:: - :maxdepth: 2\n - bigquery_storage_v1beta/services_ - bigquery_storage_v1beta/types_\n - API Reference - ------------- - .. toctree:: - :maxdepth: 2\n - bigquery_storage_v1beta2/services_ - bigquery_storage_v1beta2/types_\n\n - Changelog + before: '(?s)This package includes clients for multiple versions.*' after: | - .. include:: README.rst\n - .. include:: multiprocessing.rst\n\n + .. include:: README.rst + + .. include:: multiprocessing.rst + + Example Usage - -------------\n + ------------- + .. literalinclude:: samples/quickstart/quickstart.py :language: python :dedent: 4 :start-after: [START bigquerystorage_quickstart] - :end-before: [END bigquerystorage_quickstart]\n\n + :end-before: [END bigquerystorage_quickstart] + + API Reference ------------- .. toctree:: - :maxdepth: 2\n + :maxdepth: 2 + bigquery_storage_v1/library bigquery_storage_v1/services_ bigquery_storage_v1/types_ @@ -517,8 +501,23 @@ replacements: bigquery_storage_v1beta2/services_ bigquery_storage_v1beta2/types_ bigquery_storage_v1alpha/services_ - bigquery_storage_v1alpha/types_\n\n + bigquery_storage_v1alpha/types_ + + Changelog + --------- + + For a list of all ``google-cloud-bigquery-storage`` releases: + + .. toctree:: + :maxdepth: 2 + + CHANGELOG + + .. toctree:: + :hidden: + + summary_overview.md count: 1 - paths: [ packages/google-cloud-bigquery-storage/noxfile.py, diff --git a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml index 63b5ffa7c9fb..4830469e7c10 100644 --- a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml @@ -207,10 +207,10 @@ replacements: packages/google-cloud-bigtable/testing/constraints-3.10.txt, ] before: | - google-api-core==2.25.0 + google-api-core==2.28.0 google-auth==2.14.1 after: | - google-api-core==2.25.0 + google-api-core==2.28.0 google-cloud-core==2.0.0 grpc-google-iam-v1==0.14.2 google-crc32c==1.6.0 diff --git a/.librarian/generator-input/client-post-processing/containeranalysis-grafeas-integration.yaml b/.librarian/generator-input/client-post-processing/containeranalysis-grafeas-integration.yaml index 53b8769ddadb..650a5af5a839 100644 --- a/.librarian/generator-input/client-post-processing/containeranalysis-grafeas-integration.yaml +++ b/.librarian/generator-input/client-post-processing/containeranalysis-grafeas-integration.yaml @@ -19,14 +19,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml b/.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml index 1fae53f347eb..c98da19f9601 100644 --- a/.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml +++ b/.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml @@ -60,14 +60,14 @@ replacements: ] before: | dependencies = \[ - "google-api-core\[grpc\] >= 2.25.0, <3.0.0", + "google-api-core\[grpc\] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpcio >= 1.59.0, < 2.0.0", after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", @@ -210,10 +210,10 @@ replacements: packages/google-cloud-automl/testing/constraints-3.10.txt, ] before: | - google-api-core==2.25.0 + google-api-core==2.28.0 google-auth==2.14.1 after: | - google-api-core==2.25.0 + google-api-core==2.28.0 google-cloud-storage==2.14.0 libcst==0.2.5 pandas==1.3.4 @@ -424,10 +424,10 @@ replacements: "packages/google-cloud-monitoring/testing/constraints-3.10.txt", ] before: | - google-api-core==2.25.0 + google-api-core==2.28.0 google-auth==2.14.1 after: | - google-api-core==2.25.0 + google-api-core==2.28.0 pandas==1.3.4 numpy==1.21.3 google-auth==2.14.1 diff --git a/.librarian/generator-input/client-post-processing/remove-unused-imports.yaml b/.librarian/generator-input/client-post-processing/remove-unused-imports.yaml deleted file mode 100644 index 3ddb3835e8bb..000000000000 --- a/.librarian/generator-input/client-post-processing/remove-unused-imports.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -description: Remove unused imports -url: https://github.com/googleapis/gapic-generator-python/issues/1833 -replacements: - - paths: [ - packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1/test_gke_hub.py - ] - before: | - import google.cloud.gkehub.configmanagement.v1.configmanagement_pb2 as configmanagement_pb2 # type: ignore - import google.cloud.gkehub.multiclusteringress.v1.multiclusteringress_pb2 as multiclusteringress_pb2 # type: ignore - import google.cloud.gkehub.rbacrolebindingactuation.v1.rbacrolebindingactuation_pb2 as rbacrolebindingactuation_pb2 # type: ignore - after: "" - count: 1 - - paths: [ - packages/google-cloud-binary-authorization/tests/unit/gapic/binaryauthorization_v1/test_validation_helper_v1.py - ] - before: | - import grafeas.v1.attestation_pb2 as attestation_pb2 # type: ignore - import grafeas.v1.common_pb2 as common_pb2 # type: ignore - after: "" - count: 1 diff --git a/.librarian/generator-input/client-post-processing/spanner-integration.yaml b/.librarian/generator-input/client-post-processing/spanner-integration.yaml index 3468bd3f567f..cbd633e437a4 100644 --- a/.librarian/generator-input/client-post-processing/spanner-integration.yaml +++ b/.librarian/generator-input/client-post-processing/spanner-integration.yaml @@ -189,7 +189,7 @@ replacements: before: '(?s)dependencies = \[.*?\]\nextras = \{\s*\}' after: | dependencies = [ - "google-api-core[grpc] >= 2.25.0, <3.0.0", + "google-api-core[grpc] >= 2.28.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/.librarian/generator-input/client-post-processing/storage-integration.yaml b/.librarian/generator-input/client-post-processing/storage-integration.yaml index 0710e22a9d6e..06306f9f33b0 100644 --- a/.librarian/generator-input/client-post-processing/storage-integration.yaml +++ b/.librarian/generator-input/client-post-processing/storage-integration.yaml @@ -639,7 +639,7 @@ replacements: packages/google-cloud-storage/testing/constraints-3.10.txt ] before: | - google-api-core==2.25.0 + google-api-core==2.28.0 google-auth==2.14.1 grpcio==1.59.0 proto-plus==1.26.1 diff --git a/.librarian/generator-input/client-post-processing/temporary-post-processing.yaml b/.librarian/generator-input/client-post-processing/temporary-post-processing.yaml deleted file mode 100644 index fdc27f034614..000000000000 --- a/.librarian/generator-input/client-post-processing/temporary-post-processing.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -description: Temporary post processing until https://github.com/googleapis/google-cloud-python/pull/17914 is released -url: https://github.com/googleapis/google-cloud-python/pull/17914 -replacements: - - paths: [ - "packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/async_client.py", - "packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/client.py", - "packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/async_client.py", - "packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/client.py", - ] - before: | - header_params = \{\} - after: | - header_params: dict[str, str] = {} - count: 4 From 3273939336b7931a270b63f02e53af730e18d7af Mon Sep 17 00:00:00 2001 From: Heba Alazzeh Date: Tue, 11 Aug 2026 21:04:30 +0000 Subject: [PATCH 2/8] fix(firestore): update post-processing pattern for gapic-generator v1.38 --- .../client-post-processing/firestore-integration.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index 2f041c86ee87..bbafd3cbf7ce 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -34,8 +34,6 @@ replacements: "packages/google-cloud-firestore/google/cloud/firestore_v1/__init__.py", ] before: | - import sys\n - import google.api_core as api_core\n from google.cloud.firestore_v1 import gapic_version as package_version [\s\S]*?"WriteResult",\n\) after: | @@ -344,7 +342,6 @@ replacements: ] count: 1 - count: 1 - paths: [ "packages/google-cloud-firestore/google/cloud/firestore_admin_v1/__init__.py", ] From 0631d00bb07949917389d9701957784ca034e1f1 Mon Sep 17 00:00:00 2001 From: Heba Alazzeh Date: Tue, 11 Aug 2026 21:20:23 +0000 Subject: [PATCH 3/8] fix(firestore): update firestore_admin_v1 post-processing pattern for gapic-generator v1.38 --- .../client-post-processing/firestore-integration.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index bbafd3cbf7ce..a4356bc911b3 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -346,8 +346,6 @@ replacements: "packages/google-cloud-firestore/google/cloud/firestore_admin_v1/__init__.py", ] before: | - import sys\n - import google.api_core as api_core\n from google.cloud.firestore_admin_v1 import gapic_version as package_version [\s\S]*?"WeeklyRecurrence",\n\) after: | From 51311613f9535781ead870d7e383c5f2a2eaa003 Mon Sep 17 00:00:00 2001 From: Heba Alazzeh Date: Tue, 11 Aug 2026 21:34:47 +0000 Subject: [PATCH 4/8] fix(logging,spanner): update post-processing patterns for gapic-generator v1.38 --- .../client-post-processing/logging-integration.yaml | 3 +-- .../client-post-processing/spanner-integration.yaml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/logging-integration.yaml b/.librarian/generator-input/client-post-processing/logging-integration.yaml index a73953e305ad..9902544aed9d 100644 --- a/.librarian/generator-input/client-post-processing/logging-integration.yaml +++ b/.librarian/generator-input/client-post-processing/logging-integration.yaml @@ -400,8 +400,7 @@ replacements: "packages/google-cloud-logging/google/cloud/logging_v2/__init__.py", ] before: | - import sys\n - import google.api_core as api_core + from google.cloud.logging_v2 import gapic_version as package_version [\s\S]*?"WriteLogEntriesResponse",\n\) after: | from __future__ import absolute_import diff --git a/.librarian/generator-input/client-post-processing/spanner-integration.yaml b/.librarian/generator-input/client-post-processing/spanner-integration.yaml index cbd633e437a4..1242420c62d3 100644 --- a/.librarian/generator-input/client-post-processing/spanner-integration.yaml +++ b/.librarian/generator-input/client-post-processing/spanner-integration.yaml @@ -285,7 +285,7 @@ replacements: summary_overview.md count: 1 - paths: [packages/google-cloud-spanner/google/cloud/spanner_v1/__init__.py] - before: '(?s)import sys\n\nimport google\.api_core as api_core.*' + before: '(?s)from google\.cloud\.spanner_v1 import gapic_version as package_version.*' after: | from __future__ import absolute_import From df4053aa41601841d7beb84c39644a3f5c03d984 Mon Sep 17 00:00:00 2001 From: Heba Alazzeh Date: Tue, 11 Aug 2026 21:56:22 +0000 Subject: [PATCH 5/8] fix(spanner): remove obsolete temporary patch for gapic-generator < 1.38 --- .../spanner-integration.yaml | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/spanner-integration.yaml b/.librarian/generator-input/client-post-processing/spanner-integration.yaml index 1242420c62d3..7d9cdaa6d0e8 100644 --- a/.librarian/generator-input/client-post-processing/spanner-integration.yaml +++ b/.librarian/generator-input/client-post-processing/spanner-integration.yaml @@ -97,40 +97,7 @@ replacements: count: 1 # Temporary patch until gapic-generator 1.38 or newer is released. # From https://github.com/googleapis/google-cloud-python/pull/17838 - - paths: - - packages/google-cloud-spanner/tests/unit/gapic/spanner_admin_database_v1/test_database_admin.py - - packages/google-cloud-spanner/tests/unit/gapic/spanner_admin_instance_v1/test_instance_admin.py - - packages/google-cloud-spanner/tests/unit/gapic/spanner_v1/test_spanner.py - before: | - for config_data, expected_cert_source in test_cases: - \ env = os.environ.copy\(\) - \ env.pop\("GOOGLE_API_USE_CLIENT_CERTIFICATE", None\) - \ with mock.patch.dict\(os.environ, env, clear=True\): - after: | - for config_data, expected_cert_source in test_cases: - env = os.environ.copy() - env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", None) - env.pop("CLOUDSDK_CONTEXT_AWARE_USE_CLIENT_CERTIFICATE", None) - with mock.patch.dict(os.environ, env, clear=True): - count: 3 - # Temporary patch until gapic-generator 1.38 or newer is released. - # From https://github.com/googleapis/google-cloud-python/pull/17838 - - paths: - - packages/google-cloud-spanner/tests/unit/gapic/spanner_admin_database_v1/test_database_admin.py - - packages/google-cloud-spanner/tests/unit/gapic/spanner_admin_instance_v1/test_instance_admin.py - - packages/google-cloud-spanner/tests/unit/gapic/spanner_v1/test_spanner.py - before: | - for config_data, expected_cert_source in test_cases: - \ env = os.environ.copy\(\) - \ env.pop\("GOOGLE_API_USE_CLIENT_CERTIFICATE", ""\) - \ with mock.patch.dict\(os.environ, env, clear=True\): - after: | - for config_data, expected_cert_source in test_cases: - env = os.environ.copy() - env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") - env.pop("CLOUDSDK_CONTEXT_AWARE_USE_CLIENT_CERTIFICATE", "") - with mock.patch.dict(os.environ, env, clear=True): - count: 3 + - paths: - packages/google-cloud-spanner/tests/unit/gapic/spanner_v1/test_spanner.py # Group 1: Captures ONLY the spaces/tabs before the text From 1dc907173ed7cdc30399fb6ec799e3919dc3e093 Mon Sep 17 00:00:00 2001 From: Heba Alazzeh Date: Tue, 11 Aug 2026 22:16:16 +0000 Subject: [PATCH 6/8] fix(spanner): refine __init__.py before pattern with exact end boundary --- .../client-post-processing/spanner-integration.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.librarian/generator-input/client-post-processing/spanner-integration.yaml b/.librarian/generator-input/client-post-processing/spanner-integration.yaml index 7d9cdaa6d0e8..a8e72189662f 100644 --- a/.librarian/generator-input/client-post-processing/spanner-integration.yaml +++ b/.librarian/generator-input/client-post-processing/spanner-integration.yaml @@ -252,7 +252,9 @@ replacements: summary_overview.md count: 1 - paths: [packages/google-cloud-spanner/google/cloud/spanner_v1/__init__.py] - before: '(?s)from google\.cloud\.spanner_v1 import gapic_version as package_version.*' + before: | + from google.cloud.spanner_v1 import gapic_version as package_version + [\s\S]*?"TransactionSelector",\n\) after: | from __future__ import absolute_import From b74fd622690ca43e2d92fe3ce3ef2f6aaeef6aff Mon Sep 17 00:00:00 2001 From: Heba Alazzeh Date: Tue, 11 Aug 2026 22:18:58 +0000 Subject: [PATCH 7/8] fix(spanner): match __init__.py through closing __all__ parenthesis --- .../client-post-processing/spanner-integration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.librarian/generator-input/client-post-processing/spanner-integration.yaml b/.librarian/generator-input/client-post-processing/spanner-integration.yaml index a8e72189662f..1488c6605c94 100644 --- a/.librarian/generator-input/client-post-processing/spanner-integration.yaml +++ b/.librarian/generator-input/client-post-processing/spanner-integration.yaml @@ -254,7 +254,7 @@ replacements: - paths: [packages/google-cloud-spanner/google/cloud/spanner_v1/__init__.py] before: | from google.cloud.spanner_v1 import gapic_version as package_version - [\s\S]*?"TransactionSelector",\n\) + [\s\S]*?__all__ = \([\s\S]*?\n\) after: | from __future__ import absolute_import From 7780036dc1af1e3febe5de946cb2976b7d394251 Mon Sep 17 00:00:00 2001 From: Heba Alazzeh Date: Tue, 11 Aug 2026 22:20:46 +0000 Subject: [PATCH 8/8] fix(spanner): remove count: 1 constraint on spanner_v1/__init__.py block --- .../client-post-processing/spanner-integration.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.librarian/generator-input/client-post-processing/spanner-integration.yaml b/.librarian/generator-input/client-post-processing/spanner-integration.yaml index 1488c6605c94..73930848ec22 100644 --- a/.librarian/generator-input/client-post-processing/spanner-integration.yaml +++ b/.librarian/generator-input/client-post-processing/spanner-integration.yaml @@ -409,7 +409,6 @@ replacements: "BatchTransactionId", "DefaultTransactionOptions", ) - count: 1 - paths: [packages/google-cloud-spanner/google/cloud/spanner/__init__.py] before: '(?s)from google.cloud.spanner import gapic_version as package_version.*' after: |