diff --git a/packages/google-cloud-org-policy/.OwlBot.yaml b/packages/google-cloud-org-policy/.OwlBot.yaml deleted file mode 100644 index 1154a89e15fe..000000000000 --- a/packages/google-cloud-org-policy/.OwlBot.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2021 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. - - -deep-remove-regex: - - /owl-bot-staging - -begin-after-commit-hash: b06c9034cfcbce180ba732d03be6526e5c8ea1bc - diff --git a/packages/google-cloud-org-policy/.pre-commit-config.yaml b/packages/google-cloud-org-policy/.pre-commit-config.yaml deleted file mode 100644 index 1d74695f70b6..000000000000 --- a/packages/google-cloud-org-policy/.pre-commit-config.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2024 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. -# -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks -repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml -- repo: https://github.com/psf/black - rev: 23.7.0 - hooks: - - id: black -- repo: https://github.com/pycqa/flake8 - rev: 6.1.0 - hooks: - - id: flake8 diff --git a/packages/google-cloud-org-policy/.repo-metadata.json b/packages/google-cloud-org-policy/.repo-metadata.json index 54135fe3b379..dfa22dfb9559 100644 --- a/packages/google-cloud-org-policy/.repo-metadata.json +++ b/packages/google-cloud-org-policy/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "orgpolicy.googleapis.com", "default_version": "v2", "api_shortname": "orgpolicy" -} +} \ No newline at end of file diff --git a/packages/google-cloud-org-policy/README.rst b/packages/google-cloud-org-policy/README.rst index 81bd6b44c2d6..0641be87a280 100644 --- a/packages/google-cloud-org-policy/README.rst +++ b/packages/google-cloud-org-policy/README.rst @@ -61,7 +61,7 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.7 +Python >= 3.7, including 3.14 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy/gapic_version.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy/gapic_version.py index 20a9cd975b02..750bf9a88792 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy/gapic_version.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.14.0" # {x-release-please-version} diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy/v1/orgpolicy.proto b/packages/google-cloud-org-policy/google/cloud/orgpolicy/v1/orgpolicy.proto new file mode 100644 index 000000000000..cf1b934e6c20 --- /dev/null +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy/v1/orgpolicy.proto @@ -0,0 +1,313 @@ +// Copyright 2025 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. +// + +syntax = "proto3"; + +package google.cloud.orgpolicy.v1; + +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OrgPolicy.V1"; +option go_package = "cloud.google.com/go/orgpolicy/apiv1/orgpolicypb;orgpolicypb"; +option java_multiple_files = true; +option java_outer_classname = "OrgPolicyProto"; +option java_package = "com.google.cloud.orgpolicy.v1"; +option php_namespace = "Google\\Cloud\\OrgPolicy\\V1"; +option ruby_package = "Google::Cloud::OrgPolicy::V1"; + +// Defines a Cloud Organization `Policy` which is used to specify `Constraints` +// for configurations of Cloud Platform resources. +message Policy { + // Used in `policy_type` to specify how `list_policy` behaves at this + // resource. + // + // `ListPolicy` can define specific values and subtrees of Cloud Resource + // Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that + // are allowed or denied by setting the `allowed_values` and `denied_values` + // fields. This is achieved by using the `under:` and optional `is:` prefixes. + // The `under:` prefix is used to denote resource subtree values. + // The `is:` prefix is used to denote specific values, and is required only + // if the value contains a ":". Values prefixed with "is:" are treated the + // same as values with no prefix. + // Ancestry subtrees must be in one of the following formats: + // - "projects/", e.g. "projects/tokyo-rain-123" + // - "folders/", e.g. "folders/1234" + // - "organizations/", e.g. "organizations/1234" + // The `supports_under` field of the associated `Constraint` defines whether + // ancestry prefixes can be used. You can set `allowed_values` and + // `denied_values` in the same `Policy` if `all_values` is + // `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all + // values. If `all_values` is set to either `ALLOW` or `DENY`, + // `allowed_values` and `denied_values` must be unset. + message ListPolicy { + // This enum can be used to set `Policies` that apply to all possible + // configuration values rather than specific values in `allowed_values` or + // `denied_values`. + // + // Settting this to `ALLOW` will mean this `Policy` allows all values. + // Similarly, setting it to `DENY` will mean no values are allowed. If + // set to either `ALLOW` or `DENY, `allowed_values` and `denied_values` + // must be unset. Setting this to `ALL_VALUES_UNSPECIFIED` allows for + // setting `allowed_values` and `denied_values`. + enum AllValues { + // Indicates that allowed_values or denied_values must be set. + ALL_VALUES_UNSPECIFIED = 0; + + // A policy with this set allows all values. + ALLOW = 1; + + // A policy with this set denies all values. + DENY = 2; + } + + // List of values allowed at this resource. Can only be set if `all_values` + // is set to `ALL_VALUES_UNSPECIFIED`. + repeated string allowed_values = 1; + + // List of values denied at this resource. Can only be set if `all_values` + // is set to `ALL_VALUES_UNSPECIFIED`. + repeated string denied_values = 2; + + // The policy all_values state. + AllValues all_values = 3; + + // Optional. The Google Cloud Console will try to default to a configuration + // that matches the value specified in this `Policy`. If `suggested_value` + // is not set, it will inherit the value specified higher in the hierarchy, + // unless `inherit_from_parent` is `false`. + string suggested_value = 4; + + // Determines the inheritance behavior for this `Policy`. + // + // By default, a `ListPolicy` set at a resource supercedes any `Policy` set + // anywhere up the resource hierarchy. However, if `inherit_from_parent` is + // set to `true`, then the values from the effective `Policy` of the parent + // resource are inherited, meaning the values set in this `Policy` are + // added to the values inherited up the hierarchy. + // + // Setting `Policy` hierarchies that inherit both allowed values and denied + // values isn't recommended in most circumstances to keep the configuration + // simple and understandable. However, it is possible to set a `Policy` with + // `allowed_values` set that inherits a `Policy` with `denied_values` set. + // In this case, the values that are allowed must be in `allowed_values` and + // not present in `denied_values`. + // + // For example, suppose you have a `Constraint` + // `constraints/serviceuser.services`, which has a `constraint_type` of + // `list_constraint`, and with `constraint_default` set to `ALLOW`. + // Suppose that at the Organization level, a `Policy` is applied that + // restricts the allowed API activations to {`E1`, `E2`}. Then, if a + // `Policy` is applied to a project below the Organization that has + // `inherit_from_parent` set to `false` and field all_values set to DENY, + // then an attempt to activate any API will be denied. + // + // The following examples demonstrate different possible layerings for + // `projects/bar` parented by `organizations/foo`: + // + // Example 1 (no inherited values): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values:"E2"} + // `projects/bar` has `inherit_from_parent` `false` and values: + // {allowed_values: "E3" allowed_values: "E4"} + // The accepted values at `organizations/foo` are `E1`, `E2`. + // The accepted values at `projects/bar` are `E3`, and `E4`. + // + // Example 2 (inherited values): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values:"E2"} + // `projects/bar` has a `Policy` with values: + // {value: "E3" value: "E4" inherit_from_parent: true} + // The accepted values at `organizations/foo` are `E1`, `E2`. + // The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. + // + // Example 3 (inheriting both allowed and denied values): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values: "E2"} + // `projects/bar` has a `Policy` with: + // {denied_values: "E1"} + // The accepted values at `organizations/foo` are `E1`, `E2`. + // The value accepted at `projects/bar` is `E2`. + // + // Example 4 (RestoreDefault): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values:"E2"} + // `projects/bar` has a `Policy` with values: + // {RestoreDefault: {}} + // The accepted values at `organizations/foo` are `E1`, `E2`. + // The accepted values at `projects/bar` are either all or none depending on + // the value of `constraint_default` (if `ALLOW`, all; if + // `DENY`, none). + // + // Example 5 (no policy inherits parent policy): + // `organizations/foo` has no `Policy` set. + // `projects/bar` has no `Policy` set. + // The accepted values at both levels are either all or none depending on + // the value of `constraint_default` (if `ALLOW`, all; if + // `DENY`, none). + // + // Example 6 (ListConstraint allowing all): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values: "E2"} + // `projects/bar` has a `Policy` with: + // {all: ALLOW} + // The accepted values at `organizations/foo` are `E1`, E2`. + // Any value is accepted at `projects/bar`. + // + // Example 7 (ListConstraint allowing none): + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "E1" allowed_values: "E2"} + // `projects/bar` has a `Policy` with: + // {all: DENY} + // The accepted values at `organizations/foo` are `E1`, E2`. + // No value is accepted at `projects/bar`. + // + // Example 10 (allowed and denied subtrees of Resource Manager hierarchy): + // Given the following resource hierarchy + // O1->{F1, F2}; F1->{P1}; F2->{P2, P3}, + // `organizations/foo` has a `Policy` with values: + // {allowed_values: "under:organizations/O1"} + // `projects/bar` has a `Policy` with: + // {allowed_values: "under:projects/P3"} + // {denied_values: "under:folders/F2"} + // The accepted values at `organizations/foo` are `organizations/O1`, + // `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, + // `projects/P3`. + // The accepted values at `projects/bar` are `organizations/O1`, + // `folders/F1`, `projects/P1`. + bool inherit_from_parent = 5; + } + + // Used in `policy_type` to specify how `boolean_policy` will behave at this + // resource. + message BooleanPolicy { + // If `true`, then the `Policy` is enforced. If `false`, then any + // configuration is acceptable. + // + // Suppose you have a `Constraint` + // `constraints/compute.disableSerialPortAccess` with `constraint_default` + // set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following + // behavior: + // - If the `Policy` at this resource has enforced set to `false`, serial + // port connection attempts will be allowed. + // - If the `Policy` at this resource has enforced set to `true`, serial + // port connection attempts will be refused. + // - If the `Policy` at this resource is `RestoreDefault`, serial port + // connection attempts will be allowed. + // - If no `Policy` is set at this resource or anywhere higher in the + // resource hierarchy, serial port connection attempts will be allowed. + // - If no `Policy` is set at this resource, but one exists higher in the + // resource hierarchy, the behavior is as if the`Policy` were set at + // this resource. + // + // The following examples demonstrate the different possible layerings: + // + // Example 1 (nearest `Constraint` wins): + // `organizations/foo` has a `Policy` with: + // {enforced: false} + // `projects/bar` has no `Policy` set. + // The constraint at `projects/bar` and `organizations/foo` will not be + // enforced. + // + // Example 2 (enforcement gets replaced): + // `organizations/foo` has a `Policy` with: + // {enforced: false} + // `projects/bar` has a `Policy` with: + // {enforced: true} + // The constraint at `organizations/foo` is not enforced. + // The constraint at `projects/bar` is enforced. + // + // Example 3 (RestoreDefault): + // `organizations/foo` has a `Policy` with: + // {enforced: true} + // `projects/bar` has a `Policy` with: + // {RestoreDefault: {}} + // The constraint at `organizations/foo` is enforced. + // The constraint at `projects/bar` is not enforced, because + // `constraint_default` for the `Constraint` is `ALLOW`. + bool enforced = 1; + } + + // Ignores policies set above this resource and restores the + // `constraint_default` enforcement behavior of the specific `Constraint` at + // this resource. + // + // Suppose that `constraint_default` is set to `ALLOW` for the + // `Constraint` `constraints/serviceuser.services`. Suppose that organization + // foo.com sets a `Policy` at their Organization resource node that restricts + // the allowed service activations to deny all service activations. They + // could then set a `Policy` with the `policy_type` `restore_default` on + // several experimental projects, restoring the `constraint_default` + // enforcement of the `Constraint` for only those projects, allowing those + // projects to have all services activated. + message RestoreDefault { + + } + + // Version of the `Policy`. Default version is 0; + int32 version = 1; + + // The name of the `Constraint` the `Policy` is configuring, for example, + // `constraints/serviceuser.services`. + // + // Immutable after creation. + string constraint = 2; + + // An opaque tag indicating the current version of the `Policy`, used for + // concurrency control. + // + // When the `Policy` is returned from either a `GetPolicy` or a + // `ListOrgPolicy` request, this `etag` indicates the version of the current + // `Policy` to use when executing a read-modify-write loop. + // + // When the `Policy` is returned from a `GetEffectivePolicy` request, the + // `etag` will be unset. + // + // When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value + // that was returned from a `GetOrgPolicy` request as part of a + // read-modify-write loop for concurrency control. Not setting the `etag`in a + // `SetOrgPolicy` request will result in an unconditional write of the + // `Policy`. + bytes etag = 3; + + // The time stamp the `Policy` was previously updated. This is set by the + // server, not specified by the caller, and represents the last time a call to + // `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + // be ignored. + google.protobuf.Timestamp update_time = 4; + + // The field to populate is based on the `constraint_type` value in the + // `Constraint`. + // `list_constraint` => `list_policy` + // `boolean_constraint` => `boolean_policy` + // + // A `restore_default` message may be used with any `Constraint` type. + // + // Providing a *_policy that is incompatible with the `constraint_type` will + // result in an `invalid_argument` error. + // + // Attempting to set a `Policy` with a `policy_type` not set will result in an + // `invalid_argument` error. + oneof policy_type { + // List of values either allowed or disallowed. + ListPolicy list_policy = 5; + + // For boolean `Constraints`, whether to enforce the `Constraint` or not. + BooleanPolicy boolean_policy = 6; + + // Restores the default behavior of the constraint; independent of + // `Constraint` type. + RestoreDefault restore_default = 7; + } +} diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/gapic_version.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/gapic_version.py index 20a9cd975b02..750bf9a88792 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/gapic_version.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.14.0" # {x-release-please-version} diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/async_client.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/async_client.py index 7ae4c9bde9a7..ffb1190fb862 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/async_client.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/async_client.py @@ -35,6 +35,7 @@ from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import google.protobuf from google.cloud.orgpolicy_v2 import gapic_version as package_version @@ -358,10 +359,10 @@ async def sample_list_constraints(): Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -494,10 +495,10 @@ async def sample_list_policies(): returned from this call. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -872,10 +873,10 @@ async def sample_create_policy(): Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1231,7 +1232,7 @@ async def sample_create_custom_constraint(): parent (:class:`str`): Required. Must be in the following form: - - ``organizations/{organization_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1607,7 +1608,7 @@ async def sample_list_custom_constraints(): the set of custom constraints that will be returned from this call. Must be in one of the following forms: - - ``organizations/{organization_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1806,5 +1807,8 @@ async def __aexit__(self, exc_type, exc, tb): gapic_version=package_version.__version__ ) +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + __all__ = ("OrgPolicyAsyncClient",) diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/client.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/client.py index 9a43a4db5518..ef638a5800ab 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/client.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/client.py @@ -43,6 +43,7 @@ from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.oauth2 import service_account # type: ignore +import google.protobuf from google.cloud.orgpolicy_v2 import gapic_version as package_version @@ -812,10 +813,10 @@ def sample_list_constraints(): Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -945,10 +946,10 @@ def sample_list_policies(): returned from this call. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1314,10 +1315,10 @@ def sample_create_policy(): Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1664,7 +1665,7 @@ def sample_create_custom_constraint(): parent (str): Required. Must be in the following form: - - ``organizations/{organization_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2031,7 +2032,7 @@ def sample_list_custom_constraints(): the set of custom constraints that will be returned from this call. Must be in one of the following forms: - - ``organizations/{organization_id}`` + - ``organizations/{organization_id}`` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2231,5 +2232,7 @@ def __exit__(self, type, value, traceback): gapic_version=package_version.__version__ ) +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("OrgPolicyClient",) diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/base.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/base.py index 596aa0ea17d6..23b5511a0378 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/base.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/base.py @@ -23,6 +23,7 @@ import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import google.protobuf from google.protobuf import empty_pb2 # type: ignore from google.cloud.orgpolicy_v2 import gapic_version as package_version @@ -32,6 +33,9 @@ gapic_version=package_version.__version__ ) +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + class OrgPolicyTransport(abc.ABC): """Abstract transport class for OrgPolicy.""" @@ -63,9 +67,10 @@ def __init__( credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. - credentials_file (Optional[str]): A file with credentials that can + credentials_file (Optional[str]): Deprecated. A file with credentials that can be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is mutually exclusive with credentials. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. scopes (Optional[Sequence[str]]): A list of scopes. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/grpc.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/grpc.py index daf7dace7967..b7607c54b78b 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/grpc.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/grpc.py @@ -172,9 +172,10 @@ def __init__( are specified, the client will attempt to ascertain the credentials from the environment. This argument is ignored if a ``channel`` instance is provided. - credentials_file (Optional[str]): A file with credentials that can + credentials_file (Optional[str]): Deprecated. A file with credentials that can be loaded with :func:`google.auth.load_credentials_from_file`. This argument is ignored if a ``channel`` instance is provided. + This argument will be removed in the next major version of this library. scopes (Optional(Sequence[str])): A list of scopes. This argument is ignored if a ``channel`` instance is provided. channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]): @@ -307,9 +308,10 @@ def create_channel( credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - credentials_file (Optional[str]): A file with credentials that can + credentials_file (Optional[str]): Deprecated. A file with credentials that can be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is mutually exclusive with credentials. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. scopes (Optional[Sequence[str]]): A optional list of scopes needed for this service. These are only used when credentials are not specified and are passed to :func:`google.auth.default`. diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/grpc_asyncio.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/grpc_asyncio.py index 283c6f3a8b6d..cc4c246333d3 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/grpc_asyncio.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/grpc_asyncio.py @@ -169,8 +169,9 @@ def create_channel( credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. This argument will be + removed in the next major version of this library. scopes (Optional[Sequence[str]]): A optional list of scopes needed for this service. These are only used when credentials are not specified and are passed to :func:`google.auth.default`. @@ -221,9 +222,10 @@ def __init__( are specified, the client will attempt to ascertain the credentials from the environment. This argument is ignored if a ``channel`` instance is provided. - credentials_file (Optional[str]): A file with credentials that can + credentials_file (Optional[str]): Deprecated. A file with credentials that can be loaded with :func:`google.auth.load_credentials_from_file`. This argument is ignored if a ``channel`` instance is provided. + This argument will be removed in the next major version of this library. scopes (Optional[Sequence[str]]): A optional list of scopes needed for this service. These are only used when credentials are not specified and are passed to :func:`google.auth.default`. diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/rest.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/rest.py index e4df024cf4b5..2879d9a4a618 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/rest.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/services/org_policy/transports/rest.py @@ -24,6 +24,7 @@ from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf from google.protobuf import empty_pb2 # type: ignore from google.protobuf import json_format from requests import __version__ as requests_version @@ -53,6 +54,9 @@ rest_version=f"requests@{requests_version}", ) +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + class OrgPolicyRestInterceptor: """Interceptor for OrgPolicy. @@ -724,9 +728,10 @@ def __init__( are specified, the client will attempt to ascertain the credentials from the environment. - credentials_file (Optional[str]): A file with credentials that can + credentials_file (Optional[str]): Deprecated. A file with credentials that can be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. scopes (Optional(Sequence[str])): A list of scopes. This argument is ignored if ``channel`` is provided. client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/types/constraint.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/types/constraint.py index 73b74d04eebd..a0af18565e56 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/types/constraint.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/types/constraint.py @@ -60,9 +60,9 @@ class Constraint(proto.Message): Immutable. The resource name of the constraint. Must be in one of the following forms: - - ``projects/{project_number}/constraints/{constraint_name}`` - - ``folders/{folder_id}/constraints/{constraint_name}`` - - ``organizations/{organization_id}/constraints/{constraint_name}`` + - ``projects/{project_number}/constraints/{constraint_name}`` + - ``folders/{folder_id}/constraints/{constraint_name}`` + - ``organizations/{organization_id}/constraints/{constraint_name}`` For example, "/projects/123/constraints/compute.disableSerialPortAccess". @@ -163,7 +163,7 @@ class CustomConstraintDefinition(proto.Message): Format will be of the form : ``/`` Example: - - ``compute.googleapis.com/Instance``. + - ``compute.googleapis.com/Instance``. method_types (MutableSequence[google.cloud.orgpolicy_v2.types.Constraint.CustomConstraintDefinition.MethodType]): All the operations being applied for this constraint. @@ -428,7 +428,7 @@ class CustomConstraint(proto.Message): Immutable. Name of the constraint. This is unique within the organization. Format of the name should be - - ``organizations/{organization_id}/customConstraints/{custom_constraint_id}`` + - ``organizations/{organization_id}/customConstraints/{custom_constraint_id}`` Example: ``organizations/123/customConstraints/custom.createOnlyE2TypeVms`` @@ -442,7 +442,7 @@ class CustomConstraint(proto.Message): applies. Format will be of the form : ``/`` Example: - - ``compute.googleapis.com/Instance``. + - ``compute.googleapis.com/Instance``. method_types (MutableSequence[google.cloud.orgpolicy_v2.types.CustomConstraint.MethodType]): All the operations being applied for this constraint. diff --git a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/types/orgpolicy.py b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/types/orgpolicy.py index f45a2ff5fe05..00c48b179929 100644 --- a/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/types/orgpolicy.py +++ b/packages/google-cloud-org-policy/google/cloud/orgpolicy_v2/types/orgpolicy.py @@ -60,9 +60,9 @@ class Policy(proto.Message): the following forms, where ``constraint_name`` is the name of the constraint which this policy configures: - - ``projects/{project_number}/policies/{constraint_name}`` - - ``folders/{folder_id}/policies/{constraint_name}`` - - ``organizations/{organization_id}/policies/{constraint_name}`` + - ``projects/{project_number}/policies/{constraint_name}`` + - ``folders/{folder_id}/policies/{constraint_name}`` + - ``organizations/{organization_id}/policies/{constraint_name}`` For example, ``projects/123/policies/compute.disableSerialPortAccess``. @@ -167,13 +167,12 @@ class PolicySpec(proto.Message): In policies for boolean constraints, the following requirements apply: - - There must be one and only one policy rule where - condition is unset. - - Boolean policy rules with conditions must set - ``enforced`` to the opposite of the policy rule without a - condition. - - During policy evaluation, policy rules with conditions - that are true for a target resource take precedence. + - There must be one and only one policy rule where condition + is unset. + - Boolean policy rules with conditions must set ``enforced`` + to the opposite of the policy rule without a condition. + - During policy evaluation, policy rules with conditions + that are true for a target resource take precedence. inherit_from_parent (bool): Determines the inheritance behavior for this policy. @@ -231,7 +230,7 @@ class PolicyRule(proto.Message): A condition which determines whether this rule is used in the evaluation of the policy. When set, the ``expression`` field in the \`Expr' must include from 1 to 10 - subexpressions, joined by the "||" or "&&" operators. Each + subexpressions, joined by the "\|\|" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or @@ -263,11 +262,11 @@ class StringValues(proto.Message): values with no prefix. Ancestry subtrees must be in one of the following formats: - - ``projects/`` (for example, - ``projects/tokyo-rain-123``) - - ``folders/`` (for example, ``folders/1234``) - - ``organizations/`` (for example, - ``organizations/1234``) + - ``projects/`` (for example, + ``projects/tokyo-rain-123``) + - ``folders/`` (for example, ``folders/1234``) + - ``organizations/`` (for example, + ``organizations/1234``) The ``supports_under`` field of the associated ``Constraint`` defines whether ancestry prefixes can be used. @@ -353,10 +352,10 @@ class ListConstraintsRequest(proto.Message): Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` page_size (int): Size of the pages to be returned. This is currently unsupported and will be ignored. The @@ -421,10 +420,10 @@ class ListPoliciesRequest(proto.Message): set of constraints and policies that will be returned from this call. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` page_size (int): Size of the pages to be returned. This is currently unsupported and will be ignored. The @@ -524,10 +523,10 @@ class CreatePolicyRequest(proto.Message): Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: - - ``projects/{project_number}`` - - ``projects/{project_id}`` - - ``folders/{folder_id}`` - - ``organizations/{organization_id}`` + - ``projects/{project_number}`` + - ``projects/{project_id}`` + - ``folders/{folder_id}`` + - ``organizations/{organization_id}`` policy (google.cloud.orgpolicy_v2.types.Policy): Required. Policy to create. """ @@ -602,7 +601,7 @@ class CreateCustomConstraintRequest(proto.Message): parent (str): Required. Must be in the following form: - - ``organizations/{organization_id}`` + - ``organizations/{organization_id}`` custom_constraint (google.cloud.orgpolicy_v2.types.CustomConstraint): Required. Custom constraint to create. """ @@ -645,7 +644,7 @@ class ListCustomConstraintsRequest(proto.Message): set of custom constraints that will be returned from this call. Must be in one of the following forms: - - ``organizations/{organization_id}`` + - ``organizations/{organization_id}`` page_size (int): Size of the pages to be returned. This is currently unsupported and will be ignored. The diff --git a/packages/google-cloud-org-policy/noxfile.py b/packages/google-cloud-org-policy/noxfile.py index a86cf5a6a391..f760afd2d283 100644 --- a/packages/google-cloud-org-policy/noxfile.py +++ b/packages/google-cloud-org-policy/noxfile.py @@ -35,9 +35,15 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +63,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -87,7 +93,8 @@ def mypy(session): """Run the type checker.""" session.install( - "mypy", + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy + "mypy<1.16.0", "types-requests", "types-protobuf", ) @@ -221,7 +228,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -229,7 +243,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -364,9 +378,10 @@ def docs(session): "-T", # show full traceback on exception "-N", # no colors "-b", - "html", + "html", # builder "-d", - os.path.join("docs", "_build", "doctrees", ""), + os.path.join("docs", "_build", "doctrees", ""), # cache directory + # paths to build: os.path.join("docs", ""), os.path.join("docs", "_build", "html", ""), ) @@ -418,7 +433,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -431,7 +446,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-org-policy/pytest.ini b/packages/google-cloud-org-policy/pytest.ini index a2896feaa32a..5157ae2feb8b 100644 --- a/packages/google-cloud-org-policy/pytest.ini +++ b/packages/google-cloud-org-policy/pytest.ini @@ -22,3 +22,5 @@ filterwarnings = ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning # Remove warning once https://github.com/googleapis/google-cloud-python/issues/12873 is fixed ignore:Using the synchronous google.api_core.retry.Retry with asynchronous calls may lead to unexpected results:UserWarning + # Remove after support for `credentials_file` is dropped in `google-auth` and `gapic-generator` + ignore:The `credentials_file` argument is deprecated because of a potential security risk:DeprecationWarning diff --git a/packages/google-cloud-org-policy/samples/generated_samples/snippet_metadata_google.cloud.orgpolicy.v2.json b/packages/google-cloud-org-policy/samples/generated_samples/snippet_metadata_google.cloud.orgpolicy.v2.json index 53432edb363d..2b7bb0f2dfe7 100644 --- a/packages/google-cloud-org-policy/samples/generated_samples/snippet_metadata_google.cloud.orgpolicy.v2.json +++ b/packages/google-cloud-org-policy/samples/generated_samples/snippet_metadata_google.cloud.orgpolicy.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-org-policy", - "version": "0.1.0" + "version": "1.14.0" }, "snippets": [ { diff --git a/packages/google-cloud-org-policy/setup.py b/packages/google-cloud-org-policy/setup.py index 009b751e82d3..ebd186fe7c0a 100644 --- a/packages/google-cloud-org-policy/setup.py +++ b/packages/google-cloud-org-policy/setup.py @@ -43,6 +43,8 @@ # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", + "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", "protobuf>=3.20.2,<7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", @@ -84,6 +86,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/packages/google-cloud-org-policy/testing/constraints-3.10.txt b/packages/google-cloud-org-policy/testing/constraints-3.10.txt index ed7f9aed2559..93e6826f2af9 100644 --- a/packages/google-cloud-org-policy/testing/constraints-3.10.txt +++ b/packages/google-cloud-org-policy/testing/constraints-3.10.txt @@ -2,5 +2,7 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth +grpcio proto-plus protobuf diff --git a/packages/google-cloud-org-policy/testing/constraints-3.11.txt b/packages/google-cloud-org-policy/testing/constraints-3.11.txt index ed7f9aed2559..93e6826f2af9 100644 --- a/packages/google-cloud-org-policy/testing/constraints-3.11.txt +++ b/packages/google-cloud-org-policy/testing/constraints-3.11.txt @@ -2,5 +2,7 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth +grpcio proto-plus protobuf diff --git a/packages/google-cloud-org-policy/testing/constraints-3.12.txt b/packages/google-cloud-org-policy/testing/constraints-3.12.txt index ed7f9aed2559..93e6826f2af9 100644 --- a/packages/google-cloud-org-policy/testing/constraints-3.12.txt +++ b/packages/google-cloud-org-policy/testing/constraints-3.12.txt @@ -2,5 +2,7 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth +grpcio proto-plus protobuf diff --git a/packages/google-cloud-org-policy/testing/constraints-3.13.txt b/packages/google-cloud-org-policy/testing/constraints-3.13.txt index c20a77817caa..1e93c60e50aa 100644 --- a/packages/google-cloud-org-policy/testing/constraints-3.13.txt +++ b/packages/google-cloud-org-policy/testing/constraints-3.13.txt @@ -7,5 +7,6 @@ # Then this file should have google-cloud-foo>=1 google-api-core>=2 google-auth>=2 +grpcio>=1 proto-plus>=1 protobuf>=6 diff --git a/packages/google-cloud-org-policy/testing/constraints-3.14.txt b/packages/google-cloud-org-policy/testing/constraints-3.14.txt new file mode 100644 index 000000000000..1e93c60e50aa --- /dev/null +++ b/packages/google-cloud-org-policy/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +grpcio>=1 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-org-policy/testing/constraints-3.7.txt b/packages/google-cloud-org-policy/testing/constraints-3.7.txt index a77f12bc13e4..5d29dea38698 100644 --- a/packages/google-cloud-org-policy/testing/constraints-3.7.txt +++ b/packages/google-cloud-org-policy/testing/constraints-3.7.txt @@ -6,5 +6,7 @@ # Then this file should have google-cloud-foo==1.14.0 google-api-core==1.34.1 google-auth==2.14.1 +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) +# Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 protobuf==3.20.2 diff --git a/packages/google-cloud-org-policy/testing/constraints-3.8.txt b/packages/google-cloud-org-policy/testing/constraints-3.8.txt index ed7f9aed2559..93e6826f2af9 100644 --- a/packages/google-cloud-org-policy/testing/constraints-3.8.txt +++ b/packages/google-cloud-org-policy/testing/constraints-3.8.txt @@ -2,5 +2,7 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth +grpcio proto-plus protobuf diff --git a/packages/google-cloud-org-policy/testing/constraints-3.9.txt b/packages/google-cloud-org-policy/testing/constraints-3.9.txt index ed7f9aed2559..93e6826f2af9 100644 --- a/packages/google-cloud-org-policy/testing/constraints-3.9.txt +++ b/packages/google-cloud-org-policy/testing/constraints-3.9.txt @@ -2,5 +2,7 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth +grpcio proto-plus protobuf