Content-Length: 1075858 | pFad | https://github.com/googleapis/python-gsuiteaddons/commit/e07fce502d57a37fd901a97cce753ecbcf773143

A0 fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#8) · googleapis/python-gsuiteaddons@e07fce5 · GitHub
Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit e07fce5

Browse files
fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#8)
* 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 * add gapic_version.py * revert * fix typo * revert * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 20a14c8 commit e07fce5

File tree

9 files changed

+73
-75
lines changed

9 files changed

+73
-75
lines changed

.coveragerc

Lines 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
Lines 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__ = "0.1.0" # {x-release-please-version}

google/cloud/gsuiteaddons_v1/services/g_suite_add_ons/async_client.py

Lines changed: 14 additions & 18 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.gsuiteaddons_v1 import gapic_version as package_version
3839

3940
try:
4041
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
@@ -251,7 +252,7 @@ async def get_authorization(
251252
*,
252253
name: Optional[str] = None,
253254
retry: OptionalRetry = gapic_v1.method.DEFAULT,
254-
timeout: Optional[float] = None,
255+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
255256
metadata: Sequence[Tuple[str, str]] = (),
256257
) -> gsuiteaddons.Authorization:
257258
r"""Gets the authorization information for deployments in
@@ -358,7 +359,7 @@ async def create_deployment(
358359
deployment: Optional[gsuiteaddons.Deployment] = None,
359360
deployment_id: Optional[str] = None,
360361
retry: OptionalRetry = gapic_v1.method.DEFAULT,
361-
timeout: Optional[float] = None,
362+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
362363
metadata: Sequence[Tuple[str, str]] = (),
363364
) -> gsuiteaddons.Deployment:
364365
r"""Creates a deployment with the specified name and
@@ -481,7 +482,7 @@ async def replace_deployment(
481482
*,
482483
deployment: Optional[gsuiteaddons.Deployment] = None,
483484
retry: OptionalRetry = gapic_v1.method.DEFAULT,
484-
timeout: Optional[float] = None,
485+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
485486
metadata: Sequence[Tuple[str, str]] = (),
486487
) -> gsuiteaddons.Deployment:
487488
r"""Creates or replaces a deployment with the specified
@@ -583,7 +584,7 @@ async def get_deployment(
583584
*,
584585
name: Optional[str] = None,
585586
retry: OptionalRetry = gapic_v1.method.DEFAULT,
586-
timeout: Optional[float] = None,
587+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
587588
metadata: Sequence[Tuple[str, str]] = (),
588589
) -> gsuiteaddons.Deployment:
589590
r"""Gets the deployment with the specified name.
@@ -685,7 +686,7 @@ async def list_deployments(
685686
*,
686687
parent: Optional[str] = None,
687688
retry: OptionalRetry = gapic_v1.method.DEFAULT,
688-
timeout: Optional[float] = None,
689+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
689690
metadata: Sequence[Tuple[str, str]] = (),
690691
) -> pagers.ListDeploymentsAsyncPager:
691692
r"""Lists all deployments in a particular project.
@@ -801,7 +802,7 @@ async def delete_deployment(
801802
*,
802803
name: Optional[str] = None,
803804
retry: OptionalRetry = gapic_v1.method.DEFAULT,
804-
timeout: Optional[float] = None,
805+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
805806
metadata: Sequence[Tuple[str, str]] = (),
806807
) -> None:
807808
r"""Deletes the deployment with the given name.
@@ -894,7 +895,7 @@ async def install_deployment(
894895
*,
895896
name: Optional[str] = None,
896897
retry: OptionalRetry = gapic_v1.method.DEFAULT,
897-
timeout: Optional[float] = None,
898+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
898899
metadata: Sequence[Tuple[str, str]] = (),
899900
) -> None:
900901
r"""Installs a deployment in developer mode.
@@ -989,7 +990,7 @@ async def uninstall_deployment(
989990
*,
990991
name: Optional[str] = None,
991992
retry: OptionalRetry = gapic_v1.method.DEFAULT,
992-
timeout: Optional[float] = None,
993+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
993994
metadata: Sequence[Tuple[str, str]] = (),
994995
) -> None:
995996
r"""Uninstalls a developer mode deployment.
@@ -1084,7 +1085,7 @@ async def get_install_status(
10841085
*,
10851086
name: Optional[str] = None,
10861087
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1087-
timeout: Optional[float] = None,
1088+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
10881089
metadata: Sequence[Tuple[str, str]] = (),
10891090
) -> gsuiteaddons.InstallStatus:
10901091
r"""Fetches the install status of a developer mode
@@ -1190,14 +1191,9 @@ async def __aexit__(self, exc_type, exc, tb):
11901191
await self.transport.close()
11911192

11921193

1193-
try:
1194-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
1195-
gapic_version=pkg_resources.get_distribution(
1196-
"google-cloud-gsuiteaddons",
1197-
).version,
1198-
)
1199-
except pkg_resources.DistributionNotFound:
1200-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
1194+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
1195+
gapic_version=package_version.__version__
1196+
)
12011197

12021198

12031199
__all__ = ("GSuiteAddOnsAsyncClient",)

google/cloud/gsuiteaddons_v1/services/g_suite_add_ons/client.py

Lines changed: 14 additions & 18 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.gsuiteaddons_v1 import gapic_version as package_version
4243

4344
try:
4445
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
@@ -506,7 +507,7 @@ def get_authorization(
506507
*,
507508
name: Optional[str] = None,
508509
retry: OptionalRetry = gapic_v1.method.DEFAULT,
509-
timeout: Optional[float] = None,
510+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
510511
metadata: Sequence[Tuple[str, str]] = (),
511512
) -> gsuiteaddons.Authorization:
512513
r"""Gets the authorization information for deployments in
@@ -613,7 +614,7 @@ def create_deployment(
613614
deployment: Optional[gsuiteaddons.Deployment] = None,
614615
deployment_id: Optional[str] = None,
615616
retry: OptionalRetry = gapic_v1.method.DEFAULT,
616-
timeout: Optional[float] = None,
617+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
617618
metadata: Sequence[Tuple[str, str]] = (),
618619
) -> gsuiteaddons.Deployment:
619620
r"""Creates a deployment with the specified name and
@@ -736,7 +737,7 @@ def replace_deployment(
736737
*,
737738
deployment: Optional[gsuiteaddons.Deployment] = None,
738739
retry: OptionalRetry = gapic_v1.method.DEFAULT,
739-
timeout: Optional[float] = None,
740+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
740741
metadata: Sequence[Tuple[str, str]] = (),
741742
) -> gsuiteaddons.Deployment:
742743
r"""Creates or replaces a deployment with the specified
@@ -838,7 +839,7 @@ def get_deployment(
838839
*,
839840
name: Optional[str] = None,
840841
retry: OptionalRetry = gapic_v1.method.DEFAULT,
841-
timeout: Optional[float] = None,
842+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
842843
metadata: Sequence[Tuple[str, str]] = (),
843844
) -> gsuiteaddons.Deployment:
844845
r"""Gets the deployment with the specified name.
@@ -940,7 +941,7 @@ def list_deployments(
940941
*,
941942
parent: Optional[str] = None,
942943
retry: OptionalRetry = gapic_v1.method.DEFAULT,
943-
timeout: Optional[float] = None,
944+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
944945
metadata: Sequence[Tuple[str, str]] = (),
945946
) -> pagers.ListDeploymentsPager:
946947
r"""Lists all deployments in a particular project.
@@ -1056,7 +1057,7 @@ def delete_deployment(
10561057
*,
10571058
name: Optional[str] = None,
10581059
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1059-
timeout: Optional[float] = None,
1060+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
10601061
metadata: Sequence[Tuple[str, str]] = (),
10611062
) -> None:
10621063
r"""Deletes the deployment with the given name.
@@ -1149,7 +1150,7 @@ def install_deployment(
11491150
*,
11501151
name: Optional[str] = None,
11511152
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1152-
timeout: Optional[float] = None,
1153+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
11531154
metadata: Sequence[Tuple[str, str]] = (),
11541155
) -> None:
11551156
r"""Installs a deployment in developer mode.
@@ -1244,7 +1245,7 @@ def uninstall_deployment(
12441245
*,
12451246
name: Optional[str] = None,
12461247
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1247-
timeout: Optional[float] = None,
1248+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
12481249
metadata: Sequence[Tuple[str, str]] = (),
12491250
) -> None:
12501251
r"""Uninstalls a developer mode deployment.
@@ -1339,7 +1340,7 @@ def get_install_status(
13391340
*,
13401341
name: Optional[str] = None,
13411342
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1342-
timeout: Optional[float] = None,
1343+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
13431344
metadata: Sequence[Tuple[str, str]] = (),
13441345
) -> gsuiteaddons.InstallStatus:
13451346
r"""Fetches the install status of a developer mode
@@ -1452,14 +1453,9 @@ def __exit__(self, type, value, traceback):
14521453
self.transport.close()
14531454

14541455

1455-
try:
1456-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
1457-
gapic_version=pkg_resources.get_distribution(
1458-
"google-cloud-gsuiteaddons",
1459-
).version,
1460-
)
1461-
except pkg_resources.DistributionNotFound:
1462-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
1456+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
1457+
gapic_version=package_version.__version__
1458+
)
14631459

14641460

14651461
__all__ = ("GSuiteAddOnsClient",)

google/cloud/gsuiteaddons_v1/services/g_suite_add_ons/transports/base.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,13 @@
2424
from google.auth import credentials as ga_credentials # type: ignore
2525
from google.oauth2 import service_account # type: ignore
2626
from google.protobuf import empty_pb2 # type: ignore
27-
import pkg_resources
2827

28+
from google.cloud.gsuiteaddons_v1 import gapic_version as package_version
2929
from google.cloud.gsuiteaddons_v1.types import gsuiteaddons
3030

31-
try:
32-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
33-
gapic_version=pkg_resources.get_distribution(
34-
"google-cloud-gsuiteaddons",
35-
).version,
36-
)
37-
except pkg_resources.DistributionNotFound:
38-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
31+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
32+
gapic_version=package_version.__version__
33+
)
3934

4035

4136
class GSuiteAddOnsTransport(abc.ABC):

owlbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
shutil.rmtree("samples/generated_samples", ignore_errors=True)
3737
clean_up_generated_samples = False
3838

39-
s.move([library], excludes=["**/gapic_version.py"])
39+
s.move([library], excludes=["**/gapic_version.py", "setup.py", "testing/constraints-3.7.txt"])
4040
s.remove_staging_dirs()
4141

4242
# ----------------------------------------------------------------------------

release-please-config.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
2-
"$schema":
3-
"https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
4-
"packages": {
5-
".": {
6-
"release-type": "python",
7-
"extra-files": [
8-
"google/cloud/gsuiteaddons/gapic_version.py",
9-
{
10-
"type": "json",
11-
"path": "samples/generated_samples/snippet_metadata_google.cloud.gsuiteaddons.v1.json",
12-
"jsonpath": "$.clientLibrary.version"
13-
}
14-
]
15-
}
16-
},
17-
"release-type": "python",
18-
"plugins": [
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "python",
6+
"extra-files": [
7+
"google/cloud/gsuiteaddons/gapic_version.py",
8+
"google/cloud/gsuiteaddons_v1/gapic_version.py",
199
{
20-
"type": "sentence-case"
10+
"type": "json",
11+
"path": "samples/generated_samples/snippet_metadata_google.cloud.gsuiteaddons.v1.json",
12+
"jsonpath": "$.clientLibrary.version"
2113
}
22-
],
23-
"initial-version": "0.1.0"
24-
}
14+
]
15+
}
16+
},
17+
"release-type": "python",
18+
"plugins": [
19+
{
20+
"type": "sentence-case"
21+
}
22+
],
23+
"initial-version": "0.1.0"
24+
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
release_status = "Development Status :: 5 - Production/Stable"
3939

4040
dependencies = [
41-
"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.*",
41+
"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.*",
4242
"proto-plus >= 1.22.0, <2.0.0dev",
4343
"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",
4444
"google-apps-script-type>=0.2.0, <1.0.0dev",

testing/constraints-3.7.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Pin the version to the lower bound.
55
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev",
66
# Then this file should have google-cloud-foo==1.14.0
7-
google-api-core==1.33.2
7+
google-api-core==1.34.0
88
proto-plus==1.22.0
99
protobuf==3.19.5
10-
google-apps-script-typ==0.2.0
10+
google-apps-script-type==0.2.0

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/python-gsuiteaddons/commit/e07fce502d57a37fd901a97cce753ecbcf773143

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy