Skip to content

Commit ccaa40f

Browse files
fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#396)
* chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: googleapis/googleapis-gen@c8aa327 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: googleapis/googleapis@da380c7 Source-Link: googleapis/googleapis-gen@61ef576 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: googleapis/googleapis-gen@ab0e217 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: googleapis/googleapis@08f275f Source-Link: googleapis/googleapis-gen@555c094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(python): fix warehouse-package-name for clouderrorreporting v1beta1 PiperOrigin-RevId: 491971000 Source-Link: googleapis/googleapis@f0c519f Source-Link: googleapis/googleapis-gen@7a1ce8a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2ExY2U4YWRlNjNjNTkyNTYxYWVjZTFhNzM0ZGMzMmU0Y2ZjZDM2YiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 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 * fix path in setup.py * fix build Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 89b02c5 commit ccaa40f

File tree

49 files changed

+519
-359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+519
-359
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

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
releaseType: python
22
handleGHRelease: true
3+
manifest: true
34
# NOTE: this section is generated by synthtool.languages.python
45
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
56
branches:

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.6.3"
3+
}

docs/errorreporting_v1beta1/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Errorreporting v1beta1 API
33

44
.. automodule:: google.cloud.errorreporting_v1beta1.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

google/cloud/error_reporting/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"""Client library for Error Reporting"""
1616

1717

18-
from pkg_resources import get_distribution
18+
from google.cloud.error_reporting import gapic_version as package_version
1919

20-
__version__ = get_distribution("google-cloud-error-reporting").version
20+
__version__ = package_version.__version__
2121

2222
from google.cloud.error_reporting.client import Client
2323
from google.cloud.error_reporting.client import HTTPContext
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__ = "1.6.3" # {x-release-please-version}

google/cloud/errorreporting_v1beta1/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.errorreporting_v1beta1 import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.error_group_service import ErrorGroupServiceClient
1822
from .services.error_group_service import ErrorGroupServiceAsyncClient
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__ = "1.6.3" # {x-release-please-version}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Marker file for PEP 561.
2-
# The google-cloud-errorreporting package uses inline types.
2+
# The google-cloud-error-reporting package uses inline types.

google/cloud/errorreporting_v1beta1/services/error_group_service/async_client.py

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,19 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
20-
import pkg_resources
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
30+
31+
from google.cloud.errorreporting_v1beta1 import gapic_version as package_version
2132

2233
from google.api_core.client_options import ClientOptions
2334
from google.api_core import exceptions as core_exceptions
@@ -160,9 +171,9 @@ def transport(self) -> ErrorGroupServiceTransport:
160171
def __init__(
161172
self,
162173
*,
163-
credentials: ga_credentials.Credentials = None,
174+
credentials: Optional[ga_credentials.Credentials] = None,
164175
transport: Union[str, ErrorGroupServiceTransport] = "grpc_asyncio",
165-
client_options: ClientOptions = None,
176+
client_options: Optional[ClientOptions] = None,
166177
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
167178
) -> None:
168179
"""Instantiates the error group service client.
@@ -206,11 +217,11 @@ def __init__(
206217

207218
async def get_group(
208219
self,
209-
request: Union[error_group_service.GetGroupRequest, dict] = None,
220+
request: Optional[Union[error_group_service.GetGroupRequest, dict]] = None,
210221
*,
211-
group_name: str = None,
222+
group_name: Optional[str] = None,
212223
retry: OptionalRetry = gapic_v1.method.DEFAULT,
213-
timeout: float = None,
224+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
214225
metadata: Sequence[Tuple[str, str]] = (),
215226
) -> common.ErrorGroup:
216227
r"""Get the specified group.
@@ -242,7 +253,7 @@ async def sample_get_group():
242253
print(response)
243254
244255
Args:
245-
request (Union[google.cloud.errorreporting_v1beta1.types.GetGroupRequest, dict]):
256+
request (Optional[Union[google.cloud.errorreporting_v1beta1.types.GetGroupRequest, dict]]):
246257
The request object. A request to return an individual
247258
group.
248259
group_name (:class:`str`):
@@ -314,11 +325,11 @@ async def sample_get_group():
314325

315326
async def update_group(
316327
self,
317-
request: Union[error_group_service.UpdateGroupRequest, dict] = None,
328+
request: Optional[Union[error_group_service.UpdateGroupRequest, dict]] = None,
318329
*,
319-
group: common.ErrorGroup = None,
330+
group: Optional[common.ErrorGroup] = None,
320331
retry: OptionalRetry = gapic_v1.method.DEFAULT,
321-
timeout: float = None,
332+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
322333
metadata: Sequence[Tuple[str, str]] = (),
323334
) -> common.ErrorGroup:
324335
r"""Replace the data for the specified group.
@@ -350,7 +361,7 @@ async def sample_update_group():
350361
print(response)
351362
352363
Args:
353-
request (Union[google.cloud.errorreporting_v1beta1.types.UpdateGroupRequest, dict]):
364+
request (Optional[Union[google.cloud.errorreporting_v1beta1.types.UpdateGroupRequest, dict]]):
354365
The request object. A request to replace the existing
355366
data for the given group.
356367
group (:class:`google.cloud.errorreporting_v1beta1.types.ErrorGroup`):
@@ -423,14 +434,9 @@ async def __aexit__(self, exc_type, exc, tb):
423434
await self.transport.close()
424435

425436

426-
try:
427-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
428-
gapic_version=pkg_resources.get_distribution(
429-
"google-cloud-errorreporting",
430-
).version,
431-
)
432-
except pkg_resources.DistributionNotFound:
433-
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
437+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
438+
gapic_version=package_version.__version__
439+
)
434440

435441

436442
__all__ = ("ErrorGroupServiceAsyncClient",)

0 commit comments

Comments
 (0)