Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 2c0f3e5

Browse filesBrowse files
fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#144)
* 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: 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 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 828e0bd commit 2c0f3e5
Copy full SHA for 2c0f3e5

File tree

Expand file treeCollapse file tree

11 files changed

+83
-97
lines changed
Filter options
Expand file treeCollapse file tree

11 files changed

+83
-97
lines changed

‎.coveragerc

Copy file name to clipboardExpand all lines: .coveragerc
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,3 @@ exclude_lines =
1010
pragma: NO COVER
1111
# Ignore debug-only repr
1212
def __repr__
13-
# Ignore pkg_resources exceptions.
14-
# This is added at the module level as a safeguard for if someone
15-
# generates the code and tries to run it without pip installing. This
16-
# makes it virtually impossible to test properly.
17-
except pkg_resources.DistributionNotFound

‎google/cloud/iap_v1/gapic_version.py

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "1.5.4" # {x-release-please-version}

‎google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py

Copy file name to clipboardExpand all lines: google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py
+15-19Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
from google.api_core.client_options import ClientOptions
3535
from google.auth import credentials as ga_credentials # type: ignore
3636
from google.oauth2 import service_account # type: ignore
37-
import pkg_resources
37+
38+
from google.cloud.iap_v1 import gapic_version as package_version
3839

3940
try:
4041
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
@@ -242,7 +243,7 @@ async def set_iam_policy(
242243
request: Optional[Union[iam_policy_pb2.SetIamPolicyRequest, dict]] = None,
243244
*,
244245
retry: OptionalRetry = gapic_v1.method.DEFAULT,
245-
timeout: Optional[float] = None,
246+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
246247
metadata: Sequence[Tuple[str, str]] = (),
247248
) -> policy_pb2.Policy:
248249
r"""Sets the access control policy for an Identity-Aware Proxy
@@ -388,7 +389,7 @@ async def get_iam_policy(
388389
request: Optional[Union[iam_policy_pb2.GetIamPolicyRequest, dict]] = None,
389390
*,
390391
retry: OptionalRetry = gapic_v1.method.DEFAULT,
391-
timeout: Optional[float] = None,
392+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
392393
metadata: Sequence[Tuple[str, str]] = (),
393394
) -> policy_pb2.Policy:
394395
r"""Gets the access control policy for an Identity-Aware Proxy
@@ -534,7 +535,7 @@ async def test_iam_permissions(
534535
request: Optional[Union[iam_policy_pb2.TestIamPermissionsRequest, dict]] = None,
535536
*,
536537
retry: OptionalRetry = gapic_v1.method.DEFAULT,
537-
timeout: Optional[float] = None,
538+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
538539
metadata: Sequence[Tuple[str, str]] = (),
539540
) -> iam_policy_pb2.TestIamPermissionsResponse:
540541
r"""Returns permissions that a caller has on the Identity-Aware
@@ -620,7 +621,7 @@ async def get_iap_settings(
620621
request: Optional[Union[service.GetIapSettingsRequest, dict]] = None,
621622
*,
622623
retry: OptionalRetry = gapic_v1.method.DEFAULT,
623-
timeout: Optional[float] = None,
624+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
624625
metadata: Sequence[Tuple[str, str]] = (),
625626
) -> service.IapSettings:
626627
r"""Gets the IAP settings on a particular IAP protected
@@ -698,7 +699,7 @@ async def update_iap_settings(
698699
request: Optional[Union[service.UpdateIapSettingsRequest, dict]] = None,
699700
*,
700701
retry: OptionalRetry = gapic_v1.method.DEFAULT,
701-
timeout: Optional[float] = None,
702+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
702703
metadata: Sequence[Tuple[str, str]] = (),
703704
) -> service.IapSettings:
704705
r"""Updates the IAP settings on a particular IAP protected resource.
@@ -783,7 +784,7 @@ async def list_tunnel_dest_groups(
783784
*,
784785
parent: Optional[str] = None,
785786
retry: OptionalRetry = gapic_v1.method.DEFAULT,
786-
timeout: Optional[float] = None,
787+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
787788
metadata: Sequence[Tuple[str, str]] = (),
788789
) -> pagers.ListTunnelDestGroupsAsyncPager:
789790
r"""Lists the existing TunnelDestGroups. To group across all
@@ -904,7 +905,7 @@ async def create_tunnel_dest_group(
904905
tunnel_dest_group: Optional[service.TunnelDestGroup] = None,
905906
tunnel_dest_group_id: Optional[str] = None,
906907
retry: OptionalRetry = gapic_v1.method.DEFAULT,
907-
timeout: Optional[float] = None,
908+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
908909
metadata: Sequence[Tuple[str, str]] = (),
909910
) -> service.TunnelDestGroup:
910911
r"""Creates a new TunnelDestGroup.
@@ -1031,7 +1032,7 @@ async def get_tunnel_dest_group(
10311032
*,
10321033
name: Optional[str] = None,
10331034
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1034-
timeout: Optional[float] = None,
1035+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
10351036
metadata: Sequence[Tuple[str, str]] = (),
10361037
) -> service.TunnelDestGroup:
10371038
r"""Retrieves an existing TunnelDestGroup.
@@ -1131,7 +1132,7 @@ async def delete_tunnel_dest_group(
11311132
*,
11321133
name: Optional[str] = None,
11331134
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1134-
timeout: Optional[float] = None,
1135+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
11351136
metadata: Sequence[Tuple[str, str]] = (),
11361137
) -> None:
11371138
r"""Deletes a TunnelDestGroup.
@@ -1223,7 +1224,7 @@ async def update_tunnel_dest_group(
12231224
tunnel_dest_group: Optional[service.TunnelDestGroup] = None,
12241225
update_mask: Optional[field_mask_pb2.FieldMask] = None,
12251226
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1226-
timeout: Optional[float] = None,
1227+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
12271228
metadata: Sequence[Tuple[str, str]] = (),
12281229
) -> service.TunnelDestGroup:
12291230
r"""Updates a TunnelDestGroup.
@@ -1340,14 +1341,9 @@ async def __aexit__(self, exc_type, exc, tb):
13401341
await self.transport.close()
13411342

13421343

1343-
try:
1344-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
1345-
gapic_version=pkg_resources.get_distribution(
1346-
"google-cloud-iap",
1347-
).version,
1348-
)
1349-
except pkg_resources.DistributionNotFound:
1350-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
1344+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
1345+
gapic_version=package_version.__version__
1346+
)
13511347

13521348

13531349
__all__ = ("IdentityAwareProxyAdminServiceAsyncClient",)

‎google/cloud/iap_v1/services/identity_aware_proxy_admin_service/client.py

Copy file name to clipboardExpand all lines: google/cloud/iap_v1/services/identity_aware_proxy_admin_service/client.py
+15-19Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
from google.auth.transport import mtls # type: ignore
3939
from google.auth.transport.grpc import SslCredentials # type: ignore
4040
from google.oauth2 import service_account # type: ignore
41-
import pkg_resources
41+
42+
from google.cloud.iap_v1 import gapic_version as package_version
4243

4344
try:
4445
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
@@ -475,7 +476,7 @@ def set_iam_policy(
475476
request: Optional[Union[iam_policy_pb2.SetIamPolicyRequest, dict]] = None,
476477
*,
477478
retry: OptionalRetry = gapic_v1.method.DEFAULT,
478-
timeout: Optional[float] = None,
479+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
479480
metadata: Sequence[Tuple[str, str]] = (),
480481
) -> policy_pb2.Policy:
481482
r"""Sets the access control policy for an Identity-Aware Proxy
@@ -620,7 +621,7 @@ def get_iam_policy(
620621
request: Optional[Union[iam_policy_pb2.GetIamPolicyRequest, dict]] = None,
621622
*,
622623
retry: OptionalRetry = gapic_v1.method.DEFAULT,
623-
timeout: Optional[float] = None,
624+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
624625
metadata: Sequence[Tuple[str, str]] = (),
625626
) -> policy_pb2.Policy:
626627
r"""Gets the access control policy for an Identity-Aware Proxy
@@ -765,7 +766,7 @@ def test_iam_permissions(
765766
request: Optional[Union[iam_policy_pb2.TestIamPermissionsRequest, dict]] = None,
766767
*,
767768
retry: OptionalRetry = gapic_v1.method.DEFAULT,
768-
timeout: Optional[float] = None,
769+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
769770
metadata: Sequence[Tuple[str, str]] = (),
770771
) -> iam_policy_pb2.TestIamPermissionsResponse:
771772
r"""Returns permissions that a caller has on the Identity-Aware
@@ -850,7 +851,7 @@ def get_iap_settings(
850851
request: Optional[Union[service.GetIapSettingsRequest, dict]] = None,
851852
*,
852853
retry: OptionalRetry = gapic_v1.method.DEFAULT,
853-
timeout: Optional[float] = None,
854+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
854855
metadata: Sequence[Tuple[str, str]] = (),
855856
) -> service.IapSettings:
856857
r"""Gets the IAP settings on a particular IAP protected
@@ -929,7 +930,7 @@ def update_iap_settings(
929930
request: Optional[Union[service.UpdateIapSettingsRequest, dict]] = None,
930931
*,
931932
retry: OptionalRetry = gapic_v1.method.DEFAULT,
932-
timeout: Optional[float] = None,
933+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
933934
metadata: Sequence[Tuple[str, str]] = (),
934935
) -> service.IapSettings:
935936
r"""Updates the IAP settings on a particular IAP protected resource.
@@ -1015,7 +1016,7 @@ def list_tunnel_dest_groups(
10151016
*,
10161017
parent: Optional[str] = None,
10171018
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1018-
timeout: Optional[float] = None,
1019+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
10191020
metadata: Sequence[Tuple[str, str]] = (),
10201021
) -> pagers.ListTunnelDestGroupsPager:
10211022
r"""Lists the existing TunnelDestGroups. To group across all
@@ -1136,7 +1137,7 @@ def create_tunnel_dest_group(
11361137
tunnel_dest_group: Optional[service.TunnelDestGroup] = None,
11371138
tunnel_dest_group_id: Optional[str] = None,
11381139
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1139-
timeout: Optional[float] = None,
1140+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
11401141
metadata: Sequence[Tuple[str, str]] = (),
11411142
) -> service.TunnelDestGroup:
11421143
r"""Creates a new TunnelDestGroup.
@@ -1263,7 +1264,7 @@ def get_tunnel_dest_group(
12631264
*,
12641265
name: Optional[str] = None,
12651266
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1266-
timeout: Optional[float] = None,
1267+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
12671268
metadata: Sequence[Tuple[str, str]] = (),
12681269
) -> service.TunnelDestGroup:
12691270
r"""Retrieves an existing TunnelDestGroup.
@@ -1363,7 +1364,7 @@ def delete_tunnel_dest_group(
13631364
*,
13641365
name: Optional[str] = None,
13651366
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1366-
timeout: Optional[float] = None,
1367+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
13671368
metadata: Sequence[Tuple[str, str]] = (),
13681369
) -> None:
13691370
r"""Deletes a TunnelDestGroup.
@@ -1455,7 +1456,7 @@ def update_tunnel_dest_group(
14551456
tunnel_dest_group: Optional[service.TunnelDestGroup] = None,
14561457
update_mask: Optional[field_mask_pb2.FieldMask] = None,
14571458
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1458-
timeout: Optional[float] = None,
1459+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
14591460
metadata: Sequence[Tuple[str, str]] = (),
14601461
) -> service.TunnelDestGroup:
14611462
r"""Updates a TunnelDestGroup.
@@ -1579,14 +1580,9 @@ def __exit__(self, type, value, traceback):
15791580
self.transport.close()
15801581

15811582

1582-
try:
1583-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
1584-
gapic_version=pkg_resources.get_distribution(
1585-
"google-cloud-iap",
1586-
).version,
1587-
)
1588-
except pkg_resources.DistributionNotFound:
1589-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
1583+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
1584+
gapic_version=package_version.__version__
1585+
)
15901586

15911587

15921588
__all__ = ("IdentityAwareProxyAdminServiceClient",)

‎google/cloud/iap_v1/services/identity_aware_proxy_admin_service/transports/base.py

Copy file name to clipboardExpand all lines: google/cloud/iap_v1/services/identity_aware_proxy_admin_service/transports/base.py
+4-9Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,13 @@
2626
from google.iam.v1 import policy_pb2 # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828
from google.protobuf import empty_pb2 # type: ignore
29-
import pkg_resources
3029

30+
from google.cloud.iap_v1 import gapic_version as package_version
3131
from google.cloud.iap_v1.types import service
3232

33-
try:
34-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
35-
gapic_version=pkg_resources.get_distribution(
36-
"google-cloud-iap",
37-
).version,
38-
)
39-
except pkg_resources.DistributionNotFound:
40-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
33+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
34+
gapic_version=package_version.__version__
35+
)
4136

4237

4338
class IdentityAwareProxyAdminServiceTransport(abc.ABC):

‎google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/async_client.py

Copy file name to clipboardExpand all lines: google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/async_client.py
+13-17Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
from google.api_core.client_options import ClientOptions
3535
from google.auth import credentials as ga_credentials # type: ignore
3636
from google.oauth2 import service_account # type: ignore
37-
import pkg_resources
37+
38+
from google.cloud.iap_v1 import gapic_version as package_version
3839

3940
try:
4041
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
@@ -229,7 +230,7 @@ async def list_brands(
229230
request: Optional[Union[service.ListBrandsRequest, dict]] = None,
230231
*,
231232
retry: OptionalRetry = gapic_v1.method.DEFAULT,
232-
timeout: Optional[float] = None,
233+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
233234
metadata: Sequence[Tuple[str, str]] = (),
234235
) -> service.ListBrandsResponse:
235236
r"""Lists the existing brands for the project.
@@ -306,7 +307,7 @@ async def create_brand(
306307
request: Optional[Union[service.CreateBrandRequest, dict]] = None,
307308
*,
308309
retry: OptionalRetry = gapic_v1.method.DEFAULT,
309-
timeout: Optional[float] = None,
310+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
310311
metadata: Sequence[Tuple[str, str]] = (),
311312
) -> service.Brand:
312313
r"""Constructs a new OAuth brand for the project if one
@@ -395,7 +396,7 @@ async def get_brand(
395396
request: Optional[Union[service.GetBrandRequest, dict]] = None,
396397
*,
397398
retry: OptionalRetry = gapic_v1.method.DEFAULT,
398-
timeout: Optional[float] = None,
399+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
399400
metadata: Sequence[Tuple[str, str]] = (),
400401
) -> service.Brand:
401402
r"""Retrieves the OAuth brand of the project.
@@ -477,7 +478,7 @@ async def create_identity_aware_proxy_client(
477478
] = None,
478479
*,
479480
retry: OptionalRetry = gapic_v1.method.DEFAULT,
480-
timeout: Optional[float] = None,
481+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
481482
metadata: Sequence[Tuple[str, str]] = (),
482483
) -> service.IdentityAwareProxyClient:
483484
r"""Creates an Identity Aware Proxy (IAP) OAuth client.
@@ -562,7 +563,7 @@ async def list_identity_aware_proxy_clients(
562563
] = None,
563564
*,
564565
retry: OptionalRetry = gapic_v1.method.DEFAULT,
565-
timeout: Optional[float] = None,
566+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
566567
metadata: Sequence[Tuple[str, str]] = (),
567568
) -> pagers.ListIdentityAwareProxyClientsAsyncPager:
568569
r"""Lists the existing clients for the brand.
@@ -657,7 +658,7 @@ async def get_identity_aware_proxy_client(
657658
] = None,
658659
*,
659660
retry: OptionalRetry = gapic_v1.method.DEFAULT,
660-
timeout: Optional[float] = None,
661+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
661662
metadata: Sequence[Tuple[str, str]] = (),
662663
) -> service.IdentityAwareProxyClient:
663664
r"""Retrieves an Identity Aware Proxy (IAP) OAuth client.
@@ -740,7 +741,7 @@ async def reset_identity_aware_proxy_client_secret(
740741
] = None,
741742
*,
742743
retry: OptionalRetry = gapic_v1.method.DEFAULT,
743-
timeout: Optional[float] = None,
744+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
744745
metadata: Sequence[Tuple[str, str]] = (),
745746
) -> service.IdentityAwareProxyClient:
746747
r"""Resets an Identity Aware Proxy (IAP) OAuth client
@@ -824,7 +825,7 @@ async def delete_identity_aware_proxy_client(
824825
] = None,
825826
*,
826827
retry: OptionalRetry = gapic_v1.method.DEFAULT,
827-
timeout: Optional[float] = None,
828+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
828829
metadata: Sequence[Tuple[str, str]] = (),
829830
) -> None:
830831
r"""Deletes an Identity Aware Proxy (IAP) OAuth client.
@@ -897,14 +898,9 @@ async def __aexit__(self, exc_type, exc, tb):
897898
await self.transport.close()
898899

899900

900-
try:
901-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
902-
gapic_version=pkg_resources.get_distribution(
903-
"google-cloud-iap",
904-
).version,
905-
)
906-
except pkg_resources.DistributionNotFound:
907-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
901+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
902+
gapic_version=package_version.__version__
903+
)
908904

909905

910906
__all__ = ("IdentityAwareProxyOAuthServiceAsyncClient",)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.