Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#57)
Browse files Browse the repository at this point in the history
* 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: googleapis/googleapis@fea4387

Source-Link: googleapis/googleapis-gen@387b734
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

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Dec 8, 2022
1 parent 9b6c478 commit c0ecbf1
Show file tree
Hide file tree
Showing 31 changed files with 175 additions and 176 deletions.
5 changes: 0 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions google/cloud/network_services_v1/gapic_version.py
Original file line number Diff line number Diff line change
@@ -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.2" # {x-release-please-version}

Large diffs are not rendered by default.

110 changes: 53 additions & 57 deletions google/cloud/network_services_v1/services/network_services/client.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
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.network_services_v1 import gapic_version as package_version
from google.cloud.network_services_v1.types import (
endpoint_policy as gcn_endpoint_policy,
)
Expand All @@ -50,14 +50,9 @@
from google.cloud.network_services_v1.types import tls_route
from google.cloud.network_services_v1.types import tls_route as gcn_tls_route

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-network-services",
).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 NetworkServicesTransport(abc.ABC):
Expand Down
1 change: 1 addition & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"release-type": "python",
"extra-files": [
"google/cloud/network_services/gapic_version.py",
"google/cloud/network_services_v1/gapic_version.py",
{
"type": "json",
"path": "samples/generated_samples/snippet_metadata_google.cloud.networkservices.v1.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def sample_create_endpoint_policy():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async def sample_create_gateway():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def sample_create_grpc_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def sample_create_http_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def sample_create_mesh():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def sample_create_service_binding():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def sample_create_tcp_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def sample_create_tls_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def sample_delete_endpoint_policy():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def sample_delete_gateway():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def sample_delete_grpc_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def sample_delete_http_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def sample_delete_mesh():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def sample_delete_service_binding():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def sample_delete_tcp_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def sample_delete_tls_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def sample_update_endpoint_policy():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def sample_update_gateway():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def sample_update_grpc_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def sample_update_http_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def sample_update_mesh():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def sample_update_tcp_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def sample_update_tls_route():

print("Waiting for operation to complete...")

response = await operation.result()
response = (await operation).result()

# Handle the response
print(response)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"grpc-google-iam-v1 >= 0.12.4, < 1.0.0dev",
Expand Down
2 changes: 1 addition & 1 deletion testing/constraints-3.7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c0ecbf1

Please sign in to comment.