Skip to content

Commit 8b359e2

Browse files
authored
fix(deps): bump google-api-core to 2.25.0 (googleapis#17599)
Bump the minimum version of google-api-core from `2.24.2` to `2.25.0` to avoid use of `if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"):` in generated code
1 parent a8cbde3 commit 8b359e2

72 files changed

Lines changed: 72 additions & 160 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/gapic-generator/gapic/ads-templates/setup.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ else:
2929
release_status = "Development Status :: 5 - Production/Stable"
3030

3131
dependencies = [
32-
"google-api-core[grpc] >= 2.24.2, < 3.0.0",
32+
"google-api-core[grpc] >= 2.25.0, < 3.0.0",
3333
"google-auth >= 2.14.1, <3.0.0",
3434
"googleapis-common-protos >= 1.53.0",
3535
"grpcio >= 1.10.0",

packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,9 +744,7 @@ class {{ service.async_client_name }}:
744744
await self.transport.close()
745745

746746
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
747-
748-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
749-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
747+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
750748

751749

752750
__all__ = (

packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,9 +1062,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta):
10621062
{% endif %}
10631063

10641064
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
1065-
1066-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
1067-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
1065+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
10681066

10691067
__all__ = (
10701068
"{{ service.client_name }}",

packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ from {{ (api.naming.module_namespace + (api.naming.versioned_module_name,) + ser
5151
{% endfilter %}
5252

5353
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
54-
55-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
56-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
54+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
5755

5856

5957
class {{ service.name }}Transport(abc.ABC):

packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
5656
rest_version=f"requests@{requests_version}",
5757
)
5858

59-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
60-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
59+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
6160

6261

6362
{{ shared_macros.create_interceptor_class(api, service, method, is_async=False) }}

packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest_asyncio.py.j2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
8080
rest_version=f"google-auth@{google.auth.__version__}",
8181
)
8282

83-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
84-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
83+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
8584

8685
{{ shared_macros.create_interceptor_class(api, service, method, is_async=True) }}
8786

packages/gapic-generator/gapic/templates/setup.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ else:
3636
release_status = "Development Status :: 5 - Production/Stable"
3737

3838
dependencies = [
39-
"google-api-core[grpc] >= 2.24.2, <3.0.0",
39+
"google-api-core[grpc] >= 2.25.0, <3.0.0",
4040
# Exclude incompatible versions of `google-auth`
4141
# See https://github.com/googleapis/google-cloud-python/issues/12364
4242
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",

packages/gapic-generator/gapic/templates/testing/constraints-3.10-async-rest.txt.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# pinning their versions to their lower bounds.
99
# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
1010
# then this file should have google-cloud-foo==1.14.0
11-
google-api-core==2.24.2
11+
google-api-core==2.25.0
1212
google-auth==2.35.0
1313
grpcio==1.59.0
1414
proto-plus==1.26.1

packages/gapic-generator/gapic/templates/testing/constraints-3.10.txt.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# pinning their versions to their lower bounds.
66
# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
77
# then this file should have google-cloud-foo==1.14.0
8-
google-api-core==2.24.2
8+
google-api-core==2.25.0
99
google-auth==2.14.1
1010
grpcio==1.59.0
1111
proto-plus==1.26.1

packages/gapic-generator/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Ensure that the lower bounds of these dependencies match what we have in the
2929
# templated setup.py.j2: https://github.com/googleapis/gapic-generator-python/blob/main/gapic/templates/setup.py.j2
3030
"click >= 6.7",
31-
"google-api-core[grpc] >= 2.24.2, < 3.0.0",
31+
"google-api-core[grpc] >= 2.25.0, < 3.0.0",
3232
"googleapis-common-protos >= 1.55.0, < 2.0.0",
3333
"grpcio >= 1.24.3, < 2.0.0",
3434
# 2.11.0 is required which adds the `default` argument to `jinja-filters.map()`

0 commit comments

Comments
 (0)