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

fix(deps): Require google-api-core >=1.34.0, >=2.11.0 #510

Merged
merged 20 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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