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

Commit

Permalink
fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#510)
Browse files Browse the repository at this point in the history
* 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: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* update version in gapic_version.py

* 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: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e
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: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b
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: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* move version to gapic_version.py; clean up setup.py and owlbot.py

* configure release-please to use manifest

* set coverage level to 99%

* remove commented code

* customize testing/constraints-3.7.txt

* 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

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 authored Dec 15, 2022
1 parent cc7ea6c commit eaaca48
Show file tree
Hide file tree
Showing 71 changed files with 1,564 additions and 1,322 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
1 change: 1 addition & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
releaseType: python
handleGHRelease: true
manifest: true
# NOTE: this section is generated by synthtool.languages.python
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
branches:
Expand Down
4 changes: 4 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
".": "2.11.3"
}

11 changes: 7 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

.. include:: multiprocessing.rst

Api Reference

API Reference
-------------
.. toctree::
:maxdepth: 2
Expand All @@ -11,20 +12,22 @@ Api Reference
monitoring_v3/services
monitoring_v3/types


Migration Guide
---------------

See the guide below for instructions on migrating to the 2.x release of this library.
See the guide below for instructions on migrating to the latest version.

.. toctree::
:maxdepth: 2

UPGRADING
 UPGRADING


Changelog
---------

For a list of all previous ``google-cloud-monitoring`` releases.
For a list of all ``google-cloud-monitoring`` releases:

.. toctree::
:maxdepth: 2
Expand Down
1 change: 0 additions & 1 deletion docs/monitoring_v3/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Monitoring v3 API

.. automodule:: google.cloud.monitoring_v3.types
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions google/cloud/monitoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.monitoring import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.monitoring_v3.services.alert_policy_service.client import (
AlertPolicyServiceClient,
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/monitoring/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__ = "2.11.3" # {x-release-please-version}
4 changes: 4 additions & 0 deletions google/cloud/monitoring_v3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.monitoring import gapic_version as package_version

__version__ = package_version.__version__


from .services.alert_policy_service import AlertPolicyServiceClient
from .services.alert_policy_service import AlertPolicyServiceAsyncClient
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/monitoring_v3/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__ = "2.11.3" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,19 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
)

from google.cloud.monitoring_v3 import gapic_version as package_version

from google.api_core.client_options import ClientOptions
from google.api_core import exceptions as core_exceptions
Expand Down Expand Up @@ -181,9 +192,9 @@ def transport(self) -> AlertPolicyServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, AlertPolicyServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the alert policy service client.
Expand Down Expand Up @@ -227,11 +238,11 @@ def __init__(

async def list_alert_policies(
self,
request: Union[alert_service.ListAlertPoliciesRequest, dict] = None,
request: Optional[Union[alert_service.ListAlertPoliciesRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListAlertPoliciesAsyncPager:
r"""Lists the existing alerting policies for the
Expand Down Expand Up @@ -265,7 +276,7 @@ async def sample_list_alert_policies():
print(response)
Args:
request (Union[google.cloud.monitoring_v3.types.ListAlertPoliciesRequest, dict]):
request (Optional[Union[google.cloud.monitoring_v3.types.ListAlertPoliciesRequest, dict]]):
The request object. The protocol for the
`ListAlertPolicies` request.
name (:class:`str`):
Expand Down Expand Up @@ -362,11 +373,11 @@ async def sample_list_alert_policies():

async def get_alert_policy(
self,
request: Union[alert_service.GetAlertPolicyRequest, dict] = None,
request: Optional[Union[alert_service.GetAlertPolicyRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> alert.AlertPolicy:
r"""Gets a single alerting policy.
Expand Down Expand Up @@ -398,7 +409,7 @@ async def sample_get_alert_policy():
print(response)
Args:
request (Union[google.cloud.monitoring_v3.types.GetAlertPolicyRequest, dict]):
request (Optional[Union[google.cloud.monitoring_v3.types.GetAlertPolicyRequest, dict]]):
The request object. The protocol for the
`GetAlertPolicy` request.
name (:class:`str`):
Expand Down Expand Up @@ -480,12 +491,12 @@ async def sample_get_alert_policy():

async def create_alert_policy(
self,
request: Union[alert_service.CreateAlertPolicyRequest, dict] = None,
request: Optional[Union[alert_service.CreateAlertPolicyRequest, dict]] = None,
*,
name: str = None,
alert_policy: alert.AlertPolicy = None,
name: Optional[str] = None,
alert_policy: Optional[alert.AlertPolicy] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> alert.AlertPolicy:
r"""Creates a new alerting policy.
Expand Down Expand Up @@ -517,7 +528,7 @@ async def sample_create_alert_policy():
print(response)
Args:
request (Union[google.cloud.monitoring_v3.types.CreateAlertPolicyRequest, dict]):
request (Optional[Union[google.cloud.monitoring_v3.types.CreateAlertPolicyRequest, dict]]):
The request object. The protocol for the
`CreateAlertPolicy` request.
name (:class:`str`):
Expand Down Expand Up @@ -612,11 +623,11 @@ async def sample_create_alert_policy():

async def delete_alert_policy(
self,
request: Union[alert_service.DeleteAlertPolicyRequest, dict] = None,
request: Optional[Union[alert_service.DeleteAlertPolicyRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
r"""Deletes an alerting policy.
Expand Down Expand Up @@ -645,7 +656,7 @@ async def sample_delete_alert_policy():
await client.delete_alert_policy(request=request)
Args:
request (Union[google.cloud.monitoring_v3.types.DeleteAlertPolicyRequest, dict]):
request (Optional[Union[google.cloud.monitoring_v3.types.DeleteAlertPolicyRequest, dict]]):
The request object. The protocol for the
`DeleteAlertPolicy` request.
name (:class:`str`):
Expand Down Expand Up @@ -717,12 +728,12 @@ async def sample_delete_alert_policy():

async def update_alert_policy(
self,
request: Union[alert_service.UpdateAlertPolicyRequest, dict] = None,
request: Optional[Union[alert_service.UpdateAlertPolicyRequest, dict]] = None,
*,
update_mask: field_mask_pb2.FieldMask = None,
alert_policy: alert.AlertPolicy = None,
update_mask: Optional[field_mask_pb2.FieldMask] = None,
alert_policy: Optional[alert.AlertPolicy] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> alert.AlertPolicy:
r"""Updates an alerting policy. You can either replace the entire
Expand Down Expand Up @@ -756,7 +767,7 @@ async def sample_update_alert_policy():
print(response)
Args:
request (Union[google.cloud.monitoring_v3.types.UpdateAlertPolicyRequest, dict]):
request (Optional[Union[google.cloud.monitoring_v3.types.UpdateAlertPolicyRequest, dict]]):
The request object. The protocol for the
`UpdateAlertPolicy` request.
update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`):
Expand Down Expand Up @@ -869,14 +880,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-monitoring",
).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__ = ("AlertPolicyServiceAsyncClient",)
Loading

0 comments on commit eaaca48

Please sign in to comment.