Skip to content

Commit

Permalink
fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#189)
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: 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

* update version in gapic_version.py

* add .release-please-manifest.json with correct version

* set manifest to true in .github/release-please.yml

* add release-please-config.json

* 🦉 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

* update path to snippet metadata json

* 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 orgpolicy v2

PiperOrigin-RevId: 491637046

Source-Link: googleapis/googleapis@dc4d319

Source-Link: googleapis/googleapis-gen@5c2a267
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWMyYTI2NzU4NjUwMmIxMTBiMTFlNzVmMjA5NzcyMDZjNWU2NjJjZSJ9

* 🦉 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

* 🦉 Updates from OwlBot post-processor

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

* 🦉 Updates from OwlBot post-processor

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

* use templated owlbot.py and autogenerated setup.py

* update version in gapic_version.py

* set coverage level to 97

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 committed Dec 14, 2022
1 parent 8da30a8 commit 2d8fd20
Show file tree
Hide file tree
Showing 39 changed files with 362 additions and 242 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
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.4.1"
}
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

.. include:: README.rst

.. include:: multiprocessing.rst


API Reference
-------------
.. toctree::
Expand All @@ -18,6 +18,6 @@ Changelog
For a list of all ``google-cloud-org-policy`` releases:

.. toctree::
:maxdepth: 2
:maxdepth: 2

changelog
changelog
1 change: 0 additions & 1 deletion docs/orgpolicy_v2/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Orgpolicy v2 API

.. automodule:: google.cloud.orgpolicy_v2.types
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions google/cloud/orgpolicy/__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.orgpolicy import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.orgpolicy_v2.services.org_policy.client import OrgPolicyClient
from google.cloud.orgpolicy_v2.services.org_policy.async_client import (
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/orgpolicy/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__ = "1.4.1" # {x-release-please-version}
4 changes: 4 additions & 0 deletions google/cloud/orgpolicy_v2/__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.orgpolicy import gapic_version as package_version

__version__ = package_version.__version__


from .services.org_policy import OrgPolicyClient
from .services.org_policy import OrgPolicyAsyncClient
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/orgpolicy_v2/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__ = "1.4.1" # {x-release-please-version}
88 changes: 47 additions & 41 deletions google/cloud/orgpolicy_v2/services/org_policy/async_client.py
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.orgpolicy_v2 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 @@ -177,9 +188,9 @@ def transport(self) -> OrgPolicyTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, OrgPolicyTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the org policy client.
Expand Down Expand Up @@ -223,11 +234,11 @@ def __init__(

async def list_constraints(
self,
request: Union[orgpolicy.ListConstraintsRequest, dict] = None,
request: Optional[Union[orgpolicy.ListConstraintsRequest, dict]] = None,
*,
parent: str = None,
parent: 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.ListConstraintsAsyncPager:
r"""Lists ``Constraints`` that could be applied on the specified
Expand Down Expand Up @@ -261,7 +272,7 @@ async def sample_list_constraints():
print(response)
Args:
request (Union[google.cloud.orgpolicy_v2.types.ListConstraintsRequest, dict]):
request (Optional[Union[google.cloud.orgpolicy_v2.types.ListConstraintsRequest, dict]]):
The request object. The request sent to the
[ListConstraints]
[google.cloud.orgpolicy.v2.OrgPolicy.ListConstraints]
Expand Down Expand Up @@ -357,11 +368,11 @@ async def sample_list_constraints():

async def list_policies(
self,
request: Union[orgpolicy.ListPoliciesRequest, dict] = None,
request: Optional[Union[orgpolicy.ListPoliciesRequest, dict]] = None,
*,
parent: str = None,
parent: 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.ListPoliciesAsyncPager:
r"""Retrieves all of the ``Policies`` that exist on a particular
Expand Down Expand Up @@ -395,7 +406,7 @@ async def sample_list_policies():
print(response)
Args:
request (Union[google.cloud.orgpolicy_v2.types.ListPoliciesRequest, dict]):
request (Optional[Union[google.cloud.orgpolicy_v2.types.ListPoliciesRequest, dict]]):
The request object. The request sent to the
[ListPolicies]
[google.cloud.orgpolicy.v2.OrgPolicy.ListPolicies]
Expand Down Expand Up @@ -493,11 +504,11 @@ async def sample_list_policies():

async def get_policy(
self,
request: Union[orgpolicy.GetPolicyRequest, dict] = None,
request: Optional[Union[orgpolicy.GetPolicyRequest, 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]] = (),
) -> orgpolicy.Policy:
r"""Gets a ``Policy`` on a resource.
Expand Down Expand Up @@ -533,7 +544,7 @@ async def sample_get_policy():
print(response)
Args:
request (Union[google.cloud.orgpolicy_v2.types.GetPolicyRequest, dict]):
request (Optional[Union[google.cloud.orgpolicy_v2.types.GetPolicyRequest, dict]]):
The request object. The request sent to the [GetPolicy]
[google.cloud.orgpolicy.v2.OrgPolicy.GetPolicy] method.
name (:class:`str`):
Expand Down Expand Up @@ -609,11 +620,11 @@ async def sample_get_policy():

async def get_effective_policy(
self,
request: Union[orgpolicy.GetEffectivePolicyRequest, dict] = None,
request: Optional[Union[orgpolicy.GetEffectivePolicyRequest, 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]] = (),
) -> orgpolicy.Policy:
r"""Gets the effective ``Policy`` on a resource. This is the result
Expand Down Expand Up @@ -650,7 +661,7 @@ async def sample_get_effective_policy():
print(response)
Args:
request (Union[google.cloud.orgpolicy_v2.types.GetEffectivePolicyRequest, dict]):
request (Optional[Union[google.cloud.orgpolicy_v2.types.GetEffectivePolicyRequest, dict]]):
The request object. The request sent to the
[GetEffectivePolicy]
[google.cloud.orgpolicy.v2.OrgPolicy.GetEffectivePolicy]
Expand Down Expand Up @@ -728,12 +739,12 @@ async def sample_get_effective_policy():

async def create_policy(
self,
request: Union[orgpolicy.CreatePolicyRequest, dict] = None,
request: Optional[Union[orgpolicy.CreatePolicyRequest, dict]] = None,
*,
parent: str = None,
policy: orgpolicy.Policy = None,
parent: Optional[str] = None,
policy: Optional[orgpolicy.Policy] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> orgpolicy.Policy:
r"""Creates a Policy.
Expand Down Expand Up @@ -771,7 +782,7 @@ async def sample_create_policy():
print(response)
Args:
request (Union[google.cloud.orgpolicy_v2.types.CreatePolicyRequest, dict]):
request (Optional[Union[google.cloud.orgpolicy_v2.types.CreatePolicyRequest, dict]]):
The request object. The request sent to the
[CreatePolicyRequest]
[google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicy]
Expand Down Expand Up @@ -861,11 +872,11 @@ async def sample_create_policy():

async def update_policy(
self,
request: Union[orgpolicy.UpdatePolicyRequest, dict] = None,
request: Optional[Union[orgpolicy.UpdatePolicyRequest, dict]] = None,
*,
policy: orgpolicy.Policy = None,
policy: Optional[orgpolicy.Policy] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> orgpolicy.Policy:
r"""Updates a Policy.
Expand Down Expand Up @@ -905,7 +916,7 @@ async def sample_update_policy():
print(response)
Args:
request (Union[google.cloud.orgpolicy_v2.types.UpdatePolicyRequest, dict]):
request (Optional[Union[google.cloud.orgpolicy_v2.types.UpdatePolicyRequest, dict]]):
The request object. The request sent to the
[UpdatePolicyRequest]
[google.cloud.orgpolicy.v2.OrgPolicy.UpdatePolicy]
Expand Down Expand Up @@ -983,11 +994,11 @@ async def sample_update_policy():

async def delete_policy(
self,
request: Union[orgpolicy.DeletePolicyRequest, dict] = None,
request: Optional[Union[orgpolicy.DeletePolicyRequest, 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 a Policy.
Expand Down Expand Up @@ -1020,7 +1031,7 @@ async def sample_delete_policy():
await client.delete_policy(request=request)
Args:
request (Union[google.cloud.orgpolicy_v2.types.DeletePolicyRequest, dict]):
request (Optional[Union[google.cloud.orgpolicy_v2.types.DeletePolicyRequest, dict]]):
The request object. The request sent to the
[DeletePolicy]
[google.cloud.orgpolicy.v2.OrgPolicy.DeletePolicy]
Expand Down Expand Up @@ -1094,14 +1105,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-org-policy",
).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__ = ("OrgPolicyAsyncClient",)
Loading

0 comments on commit 2d8fd20

Please sign in to comment.