From 88b3407919c3031a5c3f7b54ae5eb9146bf3c273 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 15:45:54 -0500 Subject: [PATCH] fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#214) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(deps): Require google-api-core >=1.34.0, >=2.11.0 fix: Drop usage of pkg_resources fix: Fix timeout default values docs(samples): Snippetgen should call await on the operation coroutine before calling result PiperOrigin-RevId: 493260409 Source-Link: https://github.com/googleapis/googleapis/commit/fea43879f83a8d0dacc9353b3f75f8f46d37162f Source-Link: https://github.com/googleapis/googleapis-gen/commit/387b7344c7529ee44be84e613b19a820508c612b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzg3YjczNDRjNzUyOWVlNDRiZTg0ZTYxM2IxOWE4MjA1MDhjNjEyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add gapic_version.py * add gapic_version.py * fix(deps): require google-api-core>=1.34.0,>=2.11.0 Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- packages/google-cloud-gke-hub/.coveragerc | 7 +-- .../configmanagement_v1/gapic_version.py | 16 ++++++ .../google/cloud/gkehub_v1/gapic_version.py | 16 ++++++ .../multiclusteringress_v1/gapic_version.py | 16 ++++++ .../services/gke_hub/async_client.py | 48 ++++++++--------- .../gkehub_v1/services/gke_hub/client.py | 36 ++++++------- .../services/gke_hub/transports/base.py | 13 ++--- .../cloud/gkehub_v1beta1/gapic_version.py | 16 ++++++ .../async_client.py | 54 +++++++++---------- .../gke_hub_membership_service/client.py | 48 ++++++++--------- .../transports/base.py | 13 ++--- .../release-please-config.json | 4 ++ ..._generated_gke_hub_create_feature_async.py | 2 +- ...nerated_gke_hub_create_membership_async.py | 2 +- ..._generated_gke_hub_delete_feature_async.py | 2 +- ...nerated_gke_hub_delete_membership_async.py | 2 +- ..._generated_gke_hub_update_feature_async.py | 2 +- ...nerated_gke_hub_update_membership_async.py | 2 +- ...bership_service_create_membership_async.py | 2 +- ...bership_service_delete_membership_async.py | 2 +- ...bership_service_update_membership_async.py | 2 +- packages/google-cloud-gke-hub/setup.py | 2 +- .../testing/constraints-3.7.txt | 2 +- 23 files changed, 173 insertions(+), 136 deletions(-) create mode 100644 packages/google-cloud-gke-hub/google/cloud/gkehub_v1/configmanagement_v1/gapic_version.py create mode 100644 packages/google-cloud-gke-hub/google/cloud/gkehub_v1/gapic_version.py create mode 100644 packages/google-cloud-gke-hub/google/cloud/gkehub_v1/multiclusteringress_v1/gapic_version.py create mode 100644 packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/gapic_version.py diff --git a/packages/google-cloud-gke-hub/.coveragerc b/packages/google-cloud-gke-hub/.coveragerc index 2b3ad0f1467b..9f8007de3d6f 100644 --- a/packages/google-cloud-gke-hub/.coveragerc +++ b/packages/google-cloud-gke-hub/.coveragerc @@ -4,14 +4,9 @@ branch = True [report] show_missing = True omit = - google/cloud/gkehub/__init__.py + google/cloud/gkehub/multiclusteringress/__init__.py exclude_lines = # Re-enable the standard pragma pragma: NO COVER # Ignore debug-only repr def __repr__ - # Ignore pkg_resources exceptions. - # This is added at the module level as a safeguard for if someone - # generates the code and tries to run it without pip installing. This - # makes it virtually impossible to test properly. - except pkg_resources.DistributionNotFound diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/configmanagement_v1/gapic_version.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/configmanagement_v1/gapic_version.py new file mode 100644 index 000000000000..943734048cd8 --- /dev/null +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/configmanagement_v1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +__version__ = "1.5.3" # {x-release-please-version} diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/gapic_version.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/gapic_version.py new file mode 100644 index 000000000000..943734048cd8 --- /dev/null +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +__version__ = "1.5.3" # {x-release-please-version} diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/multiclusteringress_v1/gapic_version.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/multiclusteringress_v1/gapic_version.py new file mode 100644 index 000000000000..943734048cd8 --- /dev/null +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/multiclusteringress_v1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +__version__ = "1.5.3" # {x-release-please-version} diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/async_client.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/async_client.py index 15dd625fe275..4a8c7e44e739 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/async_client.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/async_client.py @@ -34,7 +34,8 @@ from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.gkehub_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -231,7 +232,7 @@ async def list_memberships( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMembershipsAsyncPager: r"""Lists Memberships in a given project and location. @@ -346,7 +347,7 @@ async def list_features( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListFeaturesAsyncPager: r"""Lists Features in a given project and location. @@ -460,7 +461,7 @@ async def get_membership( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.Membership: r"""Gets the details of a Membership. @@ -562,7 +563,7 @@ async def get_feature( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> feature.Feature: r"""Gets details of a single Feature. @@ -665,7 +666,7 @@ async def create_membership( resource: Optional[membership.Membership] = None, membership_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a new Membership. @@ -700,7 +701,7 @@ async def sample_create_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -816,7 +817,7 @@ async def create_feature( resource: Optional[feature.Feature] = None, feature_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Adds a new Feature. @@ -845,7 +846,7 @@ async def sample_create_feature(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -947,7 +948,7 @@ async def delete_membership( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Removes a Membership. @@ -982,7 +983,7 @@ async def sample_delete_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1076,7 +1077,7 @@ async def delete_feature( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Removes a Feature. @@ -1105,7 +1106,7 @@ async def sample_delete_feature(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1201,7 +1202,7 @@ async def update_membership( resource: Optional[membership.Membership] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates an existing Membership. @@ -1231,7 +1232,7 @@ async def sample_update_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1343,7 +1344,7 @@ async def update_feature( resource: Optional[feature.Feature] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates an existing Feature. @@ -1372,7 +1373,7 @@ async def sample_update_feature(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1481,7 +1482,7 @@ async def generate_connect_manifest( request: Optional[Union[service.GenerateConnectManifestRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> service.GenerateConnectManifestResponse: r"""Generates the manifest for deployment of the GKE connect agent. @@ -1568,14 +1569,9 @@ async def __aexit__(self, exc_type, exc, tb): await self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-gke-hub", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) __all__ = ("GkeHubAsyncClient",) diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/client.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/client.py index cce87d5194d4..a6366fd506c0 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/client.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/client.py @@ -38,7 +38,8 @@ from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.gkehub_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -488,7 +489,7 @@ def list_memberships( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMembershipsPager: r"""Lists Memberships in a given project and location. @@ -603,7 +604,7 @@ def list_features( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListFeaturesPager: r"""Lists Features in a given project and location. @@ -717,7 +718,7 @@ def get_membership( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.Membership: r"""Gets the details of a Membership. @@ -819,7 +820,7 @@ def get_feature( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> feature.Feature: r"""Gets details of a single Feature. @@ -922,7 +923,7 @@ def create_membership( resource: Optional[membership.Membership] = None, membership_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a new Membership. @@ -1073,7 +1074,7 @@ def create_feature( resource: Optional[feature.Feature] = None, feature_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Adds a new Feature. @@ -1204,7 +1205,7 @@ def delete_membership( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Removes a Membership. @@ -1333,7 +1334,7 @@ def delete_feature( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Removes a Feature. @@ -1458,7 +1459,7 @@ def update_membership( resource: Optional[membership.Membership] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates an existing Membership. @@ -1600,7 +1601,7 @@ def update_feature( resource: Optional[feature.Feature] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates an existing Feature. @@ -1738,7 +1739,7 @@ def generate_connect_manifest( request: Optional[Union[service.GenerateConnectManifestRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> service.GenerateConnectManifestResponse: r"""Generates the manifest for deployment of the GKE connect agent. @@ -1835,14 +1836,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-gke-hub", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) __all__ = ("GkeHubClient",) diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/transports/base.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/transports/base.py index 05b7c8668767..98fc87b2f3f0 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/transports/base.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/transports/base.py @@ -24,18 +24,13 @@ from google.auth import credentials as ga_credentials # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.gkehub_v1 import gapic_version as package_version from google.cloud.gkehub_v1.types import feature, membership, service -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-gke-hub", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) class GkeHubTransport(abc.ABC): diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/gapic_version.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/gapic_version.py new file mode 100644 index 000000000000..943734048cd8 --- /dev/null +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +__version__ = "1.5.3" # {x-release-please-version} diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py index 475948c4d2b6..1a6e9a4a9fe6 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py @@ -34,7 +34,8 @@ from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.gkehub_v1beta1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -246,7 +247,7 @@ async def list_memberships( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMembershipsAsyncPager: r"""Lists Memberships in a given project and location. @@ -362,7 +363,7 @@ async def get_membership( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.Membership: r"""Gets the details of a Membership. @@ -466,7 +467,7 @@ async def create_membership( resource: Optional[membership.Membership] = None, membership_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a new Membership. @@ -501,7 +502,7 @@ async def sample_create_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -615,7 +616,7 @@ async def delete_membership( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Removes a Membership. @@ -650,7 +651,7 @@ async def sample_delete_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -746,7 +747,7 @@ async def update_membership( resource: Optional[membership.Membership] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates an existing Membership. @@ -776,7 +777,7 @@ async def sample_update_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -890,7 +891,7 @@ async def generate_connect_manifest( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.GenerateConnectManifestResponse: r"""Generates the manifest for deployment of the GKE connect agent. @@ -975,7 +976,7 @@ async def validate_exclusivity( request: Optional[Union[membership.ValidateExclusivityRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.ValidateExclusivityResponse: r"""ValidateExclusivity validates the state of @@ -1060,7 +1061,7 @@ async def generate_exclusivity_manifest( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.GenerateExclusivityManifestResponse: r"""GenerateExclusivityManifest generates the manifests @@ -1154,7 +1155,7 @@ async def list_operations( request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -1208,7 +1209,7 @@ async def get_operation( request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -1262,7 +1263,7 @@ async def delete_operation( request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -1317,7 +1318,7 @@ async def cancel_operation( request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -1371,7 +1372,7 @@ async def set_iam_policy( request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Sets the IAM access control policy on the specified function. @@ -1491,7 +1492,7 @@ async def get_iam_policy( request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Gets the IAM access control policy for a function. @@ -1612,7 +1613,7 @@ async def test_iam_permissions( request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: r"""Tests the specified IAM permissions against the IAM access control @@ -1671,7 +1672,7 @@ async def get_location( request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -1725,7 +1726,7 @@ async def list_locations( request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. @@ -1781,14 +1782,9 @@ async def __aexit__(self, exc_type, exc, tb): await self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-gke-hub", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) __all__ = ("GkeHubMembershipServiceAsyncClient",) diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/client.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/client.py index 9c3c3aa1559c..00d257fe6b9e 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/client.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/client.py @@ -38,7 +38,8 @@ from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.gkehub_v1beta1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -468,7 +469,7 @@ def list_memberships( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMembershipsPager: r"""Lists Memberships in a given project and location. @@ -584,7 +585,7 @@ def get_membership( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.Membership: r"""Gets the details of a Membership. @@ -688,7 +689,7 @@ def create_membership( resource: Optional[membership.Membership] = None, membership_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a new Membership. @@ -837,7 +838,7 @@ def delete_membership( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Removes a Membership. @@ -968,7 +969,7 @@ def update_membership( resource: Optional[membership.Membership] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates an existing Membership. @@ -1112,7 +1113,7 @@ def generate_connect_manifest( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.GenerateConnectManifestResponse: r"""Generates the manifest for deployment of the GKE connect agent. @@ -1200,7 +1201,7 @@ def validate_exclusivity( request: Optional[Union[membership.ValidateExclusivityRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.ValidateExclusivityResponse: r"""ValidateExclusivity validates the state of @@ -1286,7 +1287,7 @@ def generate_exclusivity_manifest( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> membership.GenerateExclusivityManifestResponse: r"""GenerateExclusivityManifest generates the manifests @@ -1396,7 +1397,7 @@ def list_operations( request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -1450,7 +1451,7 @@ def get_operation( request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -1504,7 +1505,7 @@ def delete_operation( request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -1559,7 +1560,7 @@ def cancel_operation( request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -1613,7 +1614,7 @@ def set_iam_policy( request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Sets the IAM access control policy on the specified function. @@ -1733,7 +1734,7 @@ def get_iam_policy( request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Gets the IAM access control policy for a function. @@ -1854,7 +1855,7 @@ def test_iam_permissions( request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: r"""Tests the specified IAM permissions against the IAM access control @@ -1913,7 +1914,7 @@ def get_location( request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -1967,7 +1968,7 @@ def list_locations( request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. @@ -2017,14 +2018,9 @@ def list_locations( return response -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-gke-hub", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) __all__ = ("GkeHubMembershipServiceClient",) diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/transports/base.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/transports/base.py index 174bde099b9e..35f82cb2084f 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/transports/base.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/transports/base.py @@ -27,18 +27,13 @@ from google.iam.v1 import policy_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.gkehub_v1beta1 import gapic_version as package_version from google.cloud.gkehub_v1beta1.types import membership -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-gke-hub", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) class GkeHubMembershipServiceTransport(abc.ABC): diff --git a/packages/google-cloud-gke-hub/release-please-config.json b/packages/google-cloud-gke-hub/release-please-config.json index ffa9b42a9c8a..77c49f7bb351 100644 --- a/packages/google-cloud-gke-hub/release-please-config.json +++ b/packages/google-cloud-gke-hub/release-please-config.json @@ -4,7 +4,11 @@ ".": { "release-type": "python", "extra-files": [ + "google/cloud/gkehub_v1beta1/gapic_version.py", "google/cloud/gkehub/gapic_version.py", + "google/cloud/gkehub_v1/configmanagement_v1/gapic_version.py", + "google/cloud/gkehub_v1/gapic_version.py", + "google/cloud/gkehub_v1/multiclusteringress_v1/gapic_version.py", { "type": "json", "path": "samples/generated_samples/snippet_metadata_google.cloud.gkehub.v1.json", diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_feature_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_feature_async.py index adfa21bc12b0..f5c088dc4cc2 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_feature_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_feature_async.py @@ -47,7 +47,7 @@ async def sample_create_feature(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_async.py index 83eee9550e3a..aebbd6876e9a 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_async.py @@ -49,7 +49,7 @@ async def sample_create_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_feature_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_feature_async.py index 4063cea14056..99ffc806fcab 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_feature_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_feature_async.py @@ -47,7 +47,7 @@ async def sample_delete_feature(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_async.py index b91ded30472a..7d20a39f2ec0 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_async.py @@ -48,7 +48,7 @@ async def sample_delete_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_feature_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_feature_async.py index 6360885a8da6..e3c097a7fcd7 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_feature_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_feature_async.py @@ -47,7 +47,7 @@ async def sample_update_feature(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_async.py index c877ee131ac9..80028805e189 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_async.py @@ -48,7 +48,7 @@ async def sample_update_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py index 6ce224d9427b..33c38bacafe8 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py @@ -49,7 +49,7 @@ async def sample_create_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py index 1c3b8505d444..e9cb03b60b4a 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py @@ -48,7 +48,7 @@ async def sample_delete_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_update_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_update_membership_async.py index ce327aff2f82..cffcca5e0853 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_update_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_update_membership_async.py @@ -48,7 +48,7 @@ async def sample_update_membership(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/setup.py b/packages/google-cloud-gke-hub/setup.py index d475b0eb5f36..0d20afaf0a98 100644 --- a/packages/google-cloud-gke-hub/setup.py +++ b/packages/google-cloud-gke-hub/setup.py @@ -36,7 +36,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", "grpc-google-iam-v1 >=0.12.4, <1.0.0dev", diff --git a/packages/google-cloud-gke-hub/testing/constraints-3.7.txt b/packages/google-cloud-gke-hub/testing/constraints-3.7.txt index 883a87aefd06..2beecf99e0be 100644 --- a/packages/google-cloud-gke-hub/testing/constraints-3.7.txt +++ b/packages/google-cloud-gke-hub/testing/constraints-3.7.txt @@ -4,7 +4,7 @@ # Pin the version to the lower bound. # 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.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5 grpc-google-iam-v1==0.12.4