diff --git a/.coveragerc b/.coveragerc index d38d7d9..6babfe3 100644 --- a/.coveragerc +++ b/.coveragerc @@ -10,8 +10,3 @@ exclude_lines = 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/google/cloud/edgecontainer_v1/gapic_version.py b/google/cloud/edgecontainer_v1/gapic_version.py new file mode 100644 index 0000000..c8645b4 --- /dev/null +++ b/google/cloud/edgecontainer_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__ = "0.2.1" # {x-release-please-version} diff --git a/google/cloud/edgecontainer_v1/services/edge_container/async_client.py b/google/cloud/edgecontainer_v1/services/edge_container/async_client.py index 9e33f8b..4595151 100644 --- a/google/cloud/edgecontainer_v1/services/edge_container/async_client.py +++ b/google/cloud/edgecontainer_v1/services/edge_container/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.edgecontainer_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -241,7 +242,7 @@ async def list_clusters( *, 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.ListClustersAsyncPager: r"""Lists Clusters in a given project and location. @@ -363,7 +364,7 @@ async def get_cluster( *, 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]] = (), ) -> resources.Cluster: r"""Gets details of a single Cluster. @@ -475,7 +476,7 @@ async def create_cluster( cluster: Optional[resources.Cluster] = None, cluster_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 Cluster in a given project and @@ -514,7 +515,7 @@ async def sample_create_cluster(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -617,7 +618,7 @@ async def update_cluster( cluster: Optional[resources.Cluster] = 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 the parameters of a single Cluster. @@ -646,7 +647,7 @@ async def sample_update_cluster(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -745,7 +746,7 @@ async def delete_cluster( *, 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"""Deletes a single Cluster. @@ -775,7 +776,7 @@ async def sample_delete_cluster(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -868,7 +869,7 @@ async def generate_access_token( *, cluster: 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]] = (), ) -> service.GenerateAccessTokenResponse: r"""Generates an access token for a Cluster. @@ -968,7 +969,7 @@ async def list_node_pools( *, 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.ListNodePoolsAsyncPager: r"""Lists NodePools in a given project and location. @@ -1090,7 +1091,7 @@ async def get_node_pool( *, 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]] = (), ) -> resources.NodePool: r"""Gets details of a single NodePool. @@ -1203,7 +1204,7 @@ async def create_node_pool( node_pool: Optional[resources.NodePool] = None, node_pool_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 NodePool in a given project and @@ -1240,7 +1241,7 @@ async def sample_create_node_pool(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1342,7 +1343,7 @@ async def update_node_pool( node_pool: Optional[resources.NodePool] = 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 the parameters of a single NodePool. @@ -1371,7 +1372,7 @@ async def sample_update_node_pool(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1469,7 +1470,7 @@ async def delete_node_pool( *, 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"""Deletes a single NodePool. @@ -1499,7 +1500,7 @@ async def sample_delete_node_pool(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1592,7 +1593,7 @@ async def list_machines( *, 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.ListMachinesAsyncPager: r"""Lists Machines in a given project and location. @@ -1714,7 +1715,7 @@ async def get_machine( *, 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]] = (), ) -> resources.Machine: r"""Gets details of a single Machine. @@ -1825,7 +1826,7 @@ async def list_vpn_connections( *, 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.ListVpnConnectionsAsyncPager: r"""Lists VPN connections in a given project and @@ -1949,7 +1950,7 @@ async def get_vpn_connection( *, 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]] = (), ) -> resources.VpnConnection: r"""Gets details of a single VPN connection. @@ -2059,7 +2060,7 @@ async def create_vpn_connection( vpn_connection: Optional[resources.VpnConnection] = None, vpn_connection_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 VPN connection in a given project and @@ -2095,7 +2096,7 @@ async def sample_create_vpn_connection(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -2199,7 +2200,7 @@ async def delete_vpn_connection( *, 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"""Deletes a single VPN connection. @@ -2229,7 +2230,7 @@ async def sample_delete_vpn_connection(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -2323,14 +2324,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-edgecontainer", - ).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__ = ("EdgeContainerAsyncClient",) diff --git a/google/cloud/edgecontainer_v1/services/edge_container/client.py b/google/cloud/edgecontainer_v1/services/edge_container/client.py index 7bcbc23..153cbee 100644 --- a/google/cloud/edgecontainer_v1/services/edge_container/client.py +++ b/google/cloud/edgecontainer_v1/services/edge_container/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.edgecontainer_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -570,7 +571,7 @@ def list_clusters( *, 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.ListClustersPager: r"""Lists Clusters in a given project and location. @@ -683,7 +684,7 @@ def get_cluster( *, 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]] = (), ) -> resources.Cluster: r"""Gets details of a single Cluster. @@ -786,7 +787,7 @@ def create_cluster( cluster: Optional[resources.Cluster] = None, cluster_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 Cluster in a given project and @@ -928,7 +929,7 @@ def update_cluster( cluster: Optional[resources.Cluster] = 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 the parameters of a single Cluster. @@ -1056,7 +1057,7 @@ def delete_cluster( *, 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"""Deletes a single Cluster. @@ -1179,7 +1180,7 @@ def generate_access_token( *, cluster: 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]] = (), ) -> service.GenerateAccessTokenResponse: r"""Generates an access token for a Cluster. @@ -1279,7 +1280,7 @@ def list_node_pools( *, 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.ListNodePoolsPager: r"""Lists NodePools in a given project and location. @@ -1392,7 +1393,7 @@ def get_node_pool( *, 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]] = (), ) -> resources.NodePool: r"""Gets details of a single NodePool. @@ -1496,7 +1497,7 @@ def create_node_pool( node_pool: Optional[resources.NodePool] = None, node_pool_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 NodePool in a given project and @@ -1635,7 +1636,7 @@ def update_node_pool( node_pool: Optional[resources.NodePool] = 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 the parameters of a single NodePool. @@ -1762,7 +1763,7 @@ def delete_node_pool( *, 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"""Deletes a single NodePool. @@ -1885,7 +1886,7 @@ def list_machines( *, 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.ListMachinesPager: r"""Lists Machines in a given project and location. @@ -1998,7 +1999,7 @@ def get_machine( *, 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]] = (), ) -> resources.Machine: r"""Gets details of a single Machine. @@ -2100,7 +2101,7 @@ def list_vpn_connections( *, 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.ListVpnConnectionsPager: r"""Lists VPN connections in a given project and @@ -2215,7 +2216,7 @@ def get_vpn_connection( *, 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]] = (), ) -> resources.VpnConnection: r"""Gets details of a single VPN connection. @@ -2316,7 +2317,7 @@ def create_vpn_connection( vpn_connection: Optional[resources.VpnConnection] = None, vpn_connection_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 VPN connection in a given project and @@ -2456,7 +2457,7 @@ def delete_vpn_connection( *, 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"""Deletes a single VPN connection. @@ -2587,14 +2588,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-edgecontainer", - ).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__ = ("EdgeContainerClient",) diff --git a/google/cloud/edgecontainer_v1/services/edge_container/transports/base.py b/google/cloud/edgecontainer_v1/services/edge_container/transports/base.py index e5bf8fd..25159d2 100644 --- a/google/cloud/edgecontainer_v1/services/edge_container/transports/base.py +++ b/google/cloud/edgecontainer_v1/services/edge_container/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.edgecontainer_v1 import gapic_version as package_version from google.cloud.edgecontainer_v1.types import resources, service -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-edgecontainer", - ).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 EdgeContainerTransport(abc.ABC): diff --git a/release-please-config.json b/release-please-config.json index 041ba68..793b81c 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -4,6 +4,7 @@ ".": { "release-type": "python", "extra-files": [ + "google/cloud/edgecontainer_v1/gapic_version.py", "google/cloud/edgecontainer/gapic_version.py", { "type": "json", diff --git a/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py b/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py index 393859c..91348ae 100644 --- a/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py +++ b/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py @@ -56,7 +56,7 @@ async def sample_create_cluster(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py b/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py index 0e874c4..23c97c3 100644 --- a/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py +++ b/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py @@ -54,7 +54,7 @@ async def sample_create_node_pool(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py b/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py index 8426956..baf9ee5 100644 --- a/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py +++ b/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py @@ -53,7 +53,7 @@ async def sample_create_vpn_connection(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py b/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py index dc09ca2..3ae747c 100644 --- a/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py +++ b/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py @@ -48,7 +48,7 @@ async def sample_delete_cluster(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py b/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py index f5fd4a6..fd60e72 100644 --- a/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py +++ b/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py @@ -48,7 +48,7 @@ async def sample_delete_node_pool(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py b/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py index a54b2b6..f1fb9c8 100644 --- a/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py +++ b/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py @@ -48,7 +48,7 @@ async def sample_delete_vpn_connection(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py b/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py index bbf81b6..876bc1c 100644 --- a/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py +++ b/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py @@ -47,7 +47,7 @@ async def sample_update_cluster(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py b/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py index 4e88feb..e4f8fe3 100644 --- a/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py +++ b/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py @@ -47,7 +47,7 @@ async def sample_update_node_pool(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/setup.py b/setup.py index 81a6687..60d8a6f 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,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", ] diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index 6f3158c..6c44adf 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # 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