Skip to content

Commit 0aa48cd

Browse files
committed
docs(templates): clarify google-api-core version comment in _compat.py template and storagebatchoperations golden
1 parent f813e56 commit 0aa48cd

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

  • packages/gapic-generator
    • gapic/templates/%namespace/%name_%version/%sub
    • tests/integration/goldens/storagebatchoperations/google/cloud/storagebatchoperations_v1

packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/_compat.py.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ except ImportError:
145145
try:
146146
from google.api_core.gapic_v1.requests import setup_request_id # type: ignore
147147
except ImportError:
148-
# TODO(https://github.com/googleapis/google-cloud-python/issues/17813): Remove this fallback when google-api-core >= 2.26.0 is the minimum required version.
148+
# TODO(https://github.com/googleapis/google-cloud-python/issues/17813): Request ID setup helper was introduced in google-api-core 2.26.0.
149+
# Remove this fallback definition when google-api-core >= 2.26.0 becomes the minimum required version in generated client setup dependencies.
149150
def setup_request_id(request, field_name: str, is_proto3_optional: bool):
150151
"""Populate a UUID4 field in the request if it is not already set.
151152

packages/gapic-generator/tests/integration/goldens/storagebatchoperations/google/cloud/storagebatchoperations_v1/_compat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
try:
2020
from google.api_core.gapic_v1.requests import setup_request_id # type: ignore
2121
except ImportError:
22-
# TODO(https://github.com/googleapis/google-cloud-python/issues/17813): Remove this fallback when google-api-core >= 2.26.0 is the minimum required version.
22+
# TODO(https://github.com/googleapis/google-cloud-python/issues/17813): Request ID setup helper was introduced in google-api-core 2.26.0.
23+
# Remove this fallback definition when google-api-core >= 2.26.0 becomes the minimum required version in generated client setup dependencies.
2324
def setup_request_id(request, field_name: str, is_proto3_optional: bool):
2425
"""Populate a UUID4 field in the request if it is not already set.
2526

0 commit comments

Comments
 (0)