Skip to content

Commit

Permalink
Use moved iam.policy now at google.api_core.iam.policy (#6741)
Browse files Browse the repository at this point in the history
* update references to iam to use api-core\
* Update dependency to api_core
  • Loading branch information
crwilcox authored Dec 3, 2018
1 parent 5907c7c commit 2842fa8
Show file tree
Hide file tree
Showing 37 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion asset/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'enum34; python_version < "3.4"',
'grpc-google-iam-v1 >= 0.11.4, < 0.12dev',
]
Expand Down
2 changes: 1 addition & 1 deletion automl/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
version = '0.1.1'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'enum34; python_version < "3.4"',
]

Expand Down
2 changes: 1 addition & 1 deletion bigquery/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 5 - Production/Stable'
dependencies = [
'google-api-core >= 1.0.0, < 2.0.0dev',
'google-api-core >= 1.6.0, < 2.0.0dev',
'google-cloud-core >= 0.28.0, < 0.29dev',
'google-resumable-media >= 0.3.1',
]
Expand Down
2 changes: 1 addition & 1 deletion bigquery_storage/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version = '0.1.0'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.5.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'enum34; python_version < "3.4"',
]
extras = {
Expand Down
2 changes: 1 addition & 1 deletion bigtable/google/cloud/bigtable/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def test_iam_permissions(self, permissions):
def _to_dict_from_policy_pb(self, policy):
"""Returns a dictionary representation of resource returned from
the getIamPolicy API to use as parameter for
:meth: google.cloud.iam.Policy.from_api_repr
:meth: google.api_core.iam.Policy.from_api_repr
"""
pb_dict = {}
bindings = [
Expand Down
2 changes: 1 addition & 1 deletion bigtable/google/cloud/bigtable/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud.iam import Policy as BasePolicy
from google.api_core.iam import Policy as BasePolicy
from google.cloud._helpers import _to_bytes

"""IAM roles supported by Bigtable Instance resource"""
Expand Down
2 changes: 1 addition & 1 deletion bigtable/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 4 - Beta'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'google-cloud-core >= 0.28.0, <0.29dev',
'grpc-google-iam-v1 >= 0.11.4, < 0.12dev',
]
Expand Down
2 changes: 1 addition & 1 deletion container/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
]
extras = {
}
Expand Down
2 changes: 1 addition & 1 deletion dataproc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
]
extras = {
}
Expand Down
2 changes: 1 addition & 1 deletion datastore/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 5 - Production/Stable'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'google-cloud-core >=0.28.0, <0.29dev',
]
extras = {
Expand Down
2 changes: 1 addition & 1 deletion dlp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version = '0.9.0'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'enum34; python_version < "3.4"',
]

Expand Down
2 changes: 1 addition & 1 deletion firestore/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 4 - Beta'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'google-cloud-core >= 0.28.0, < 0.29dev',
'pytz',
]
Expand Down
2 changes: 1 addition & 1 deletion iot/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
version = '0.1.0'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'grpc-google-iam-v1 >= 0.11.4, < 0.12dev',
'enum34; python_version < "3.4"',
]
Expand Down
2 changes: 1 addition & 1 deletion kms/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version = '0.2.0'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'grpc-google-iam-v1 >= 0.11.4, < 0.12dev',
'enum34; python_version < "3.4"',
]
Expand Down
2 changes: 1 addition & 1 deletion language/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 5 - Production/Stable'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'enum34;python_version<"3.4"'
]
extras = {
Expand Down
2 changes: 1 addition & 1 deletion logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 5 - Production/Stable'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'google-cloud-core >= 0.28.0, < 0.29dev',
]
extras = {
Expand Down
2 changes: 1 addition & 1 deletion monitoring/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
]
extras = {
'pandas': 'pandas >= 0.17.1',
Expand Down
2 changes: 1 addition & 1 deletion oslogin/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
]
extras = {
}
Expand Down
2 changes: 1 addition & 1 deletion pubsub/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 4 - Beta'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'grpc-google-iam-v1 >= 0.11.4, < 0.12dev',
'enum34; python_version < "3.4"',
]
Expand Down
2 changes: 1 addition & 1 deletion redis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'enum34; python_version < "3.4"',
]
extras = {
Expand Down
2 changes: 1 addition & 1 deletion resource_manager/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core >= 1.0.0, < 2.0.0dev',
'google-api-core >= 1.6.0, < 2.0.0dev',
'google-cloud-core >= 0.28.0, < 0.29dev',
]
extras = {
Expand Down
2 changes: 1 addition & 1 deletion runtimeconfig/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core >= 1.0.0, < 2.0.0dev',
'google-api-core >= 1.6.0, < 2.0.0dev',
'google-cloud-core >= 0.28.0, < 0.29dev',
]
extras = {
Expand Down
2 changes: 1 addition & 1 deletion scheduler/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'enum34; python_version < "3.4"',
]

Expand Down
2 changes: 1 addition & 1 deletion securitycenter/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version = '0.1.0'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'grpc-google-iam-v1 >= 0.11.4, < 0.12dev',
'enum34; python_version < "3.4"',
]
Expand Down
2 changes: 1 addition & 1 deletion speech/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 4 - Beta'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
]
extras = {
}
Expand Down
8 changes: 4 additions & 4 deletions storage/google/cloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
from google.cloud._helpers import _to_bytes
from google.cloud._helpers import _bytes_to_unicode
from google.cloud.exceptions import NotFound
from google.cloud.iam import Policy
from google.api_core.iam import Policy
from google.cloud.storage._helpers import _PropertyMixin
from google.cloud.storage._helpers import _scalar_property
from google.cloud.storage._signing import generate_signed_url
Expand Down Expand Up @@ -1293,7 +1293,7 @@ def get_iam_policy(self, client=None):
:param client: Optional. The client to use. If not passed, falls back
to the ``client`` stored on the current object's bucket.
:rtype: :class:`google.cloud.iam.Policy`
:rtype: :class:`google.api_core.iam.Policy`
:returns: the policy instance, based on the resource returned from
the ``getIamPolicy`` API request.
"""
Expand Down Expand Up @@ -1326,15 +1326,15 @@ def set_iam_policy(self, policy, client=None):
If :attr:`user_project` is set on the bucket, bills the API request
to that project.
:type policy: :class:`google.cloud.iam.Policy`
:type policy: :class:`google.api_core.iam.Policy`
:param policy: policy instance used to update bucket's IAM policy.
:type client: :class:`~google.cloud.storage.client.Client` or
``NoneType``
:param client: Optional. The client to use. If not passed, falls back
to the ``client`` stored on the current bucket.
:rtype: :class:`google.cloud.iam.Policy`
:rtype: :class:`google.api_core.iam.Policy`
:returns: the policy instance, based on the resource returned from
the ``setIamPolicy`` API request.
"""
Expand Down
8 changes: 4 additions & 4 deletions storage/google/cloud/storage/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from google.cloud._helpers import _NOW
from google.cloud._helpers import _rfc3339_to_datetime
from google.cloud.exceptions import NotFound
from google.cloud.iam import Policy
from google.api_core.iam import Policy
from google.cloud.storage import _signing
from google.cloud.storage._helpers import _PropertyMixin
from google.cloud.storage._helpers import _scalar_property
Expand Down Expand Up @@ -1563,7 +1563,7 @@ def get_iam_policy(self, client=None):
:param client: Optional. The client to use. If not passed, falls back
to the ``client`` stored on the current bucket.
:rtype: :class:`google.cloud.iam.Policy`
:rtype: :class:`google.api_core.iam.Policy`
:returns: the policy instance, based on the resource returned from
the ``getIamPolicy`` API request.
"""
Expand All @@ -1589,15 +1589,15 @@ def set_iam_policy(self, policy, client=None):
If :attr:`user_project` is set, bills the API request to that project.
:type policy: :class:`google.cloud.iam.Policy`
:type policy: :class:`google.api_core.iam.Policy`
:param policy: policy instance used to update bucket's IAM policy.
:type client: :class:`~google.cloud.storage.client.Client` or
``NoneType``
:param client: Optional. The client to use. If not passed, falls back
to the ``client`` stored on the current bucket.
:rtype: :class:`google.cloud.iam.Policy`
:rtype: :class:`google.api_core.iam.Policy`
:returns: the policy instance, based on the resource returned from
the ``setIamPolicy`` API request.
"""
Expand Down
2 changes: 1 addition & 1 deletion storage/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 5 - Production/Stable'
dependencies = [
'google-api-core >= 1.0.0, < 2.0.0dev',
'google-api-core >= 1.6.0, < 2.0.0dev',
'google-cloud-core >= 0.28.0, < 0.29dev',
'google-resumable-media >= 0.3.1',
]
Expand Down
8 changes: 4 additions & 4 deletions storage/tests/unit/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@ def test_get_iam_policy(self):
from google.cloud.storage.iam import STORAGE_OWNER_ROLE
from google.cloud.storage.iam import STORAGE_EDITOR_ROLE
from google.cloud.storage.iam import STORAGE_VIEWER_ROLE
from google.cloud.iam import Policy
from google.api_core.iam import Policy

BLOB_NAME = "blob-name"
PATH = "/b/name/o/%s" % (BLOB_NAME,)
Expand Down Expand Up @@ -1935,7 +1935,7 @@ def test_get_iam_policy(self):
)

def test_get_iam_policy_w_user_project(self):
from google.cloud.iam import Policy
from google.api_core.iam import Policy

BLOB_NAME = "blob-name"
USER_PROJECT = "user-project-123"
Expand Down Expand Up @@ -1979,7 +1979,7 @@ def test_set_iam_policy(self):
from google.cloud.storage.iam import STORAGE_OWNER_ROLE
from google.cloud.storage.iam import STORAGE_EDITOR_ROLE
from google.cloud.storage.iam import STORAGE_VIEWER_ROLE
from google.cloud.iam import Policy
from google.api_core.iam import Policy

BLOB_NAME = "blob-name"
PATH = "/b/name/o/%s" % (BLOB_NAME,)
Expand Down Expand Up @@ -2029,7 +2029,7 @@ def test_set_iam_policy(self):
self.assertEqual(sorted(found["members"]), sorted(expected["members"]))

def test_set_iam_policy_w_user_project(self):
from google.cloud.iam import Policy
from google.api_core.iam import Policy

BLOB_NAME = "blob-name"
USER_PROJECT = "user-project-123"
Expand Down
8 changes: 4 additions & 4 deletions storage/tests/unit/test_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ def test_get_iam_policy(self):
from google.cloud.storage.iam import STORAGE_OWNER_ROLE
from google.cloud.storage.iam import STORAGE_EDITOR_ROLE
from google.cloud.storage.iam import STORAGE_VIEWER_ROLE
from google.cloud.iam import Policy
from google.api_core.iam import Policy

NAME = "name"
PATH = "/b/%s" % (NAME,)
Expand Down Expand Up @@ -1656,7 +1656,7 @@ def test_get_iam_policy(self):
self.assertEqual(kw[0]["query_params"], {})

def test_get_iam_policy_w_user_project(self):
from google.cloud.iam import Policy
from google.api_core.iam import Policy

NAME = "name"
USER_PROJECT = "user-project-123"
Expand Down Expand Up @@ -1692,7 +1692,7 @@ def test_set_iam_policy(self):
from google.cloud.storage.iam import STORAGE_OWNER_ROLE
from google.cloud.storage.iam import STORAGE_EDITOR_ROLE
from google.cloud.storage.iam import STORAGE_VIEWER_ROLE
from google.cloud.iam import Policy
from google.api_core.iam import Policy

NAME = "name"
PATH = "/b/%s" % (NAME,)
Expand Down Expand Up @@ -1744,7 +1744,7 @@ def test_set_iam_policy_w_user_project(self):
from google.cloud.storage.iam import STORAGE_OWNER_ROLE
from google.cloud.storage.iam import STORAGE_EDITOR_ROLE
from google.cloud.storage.iam import STORAGE_VIEWER_ROLE
from google.cloud.iam import Policy
from google.api_core.iam import Policy

NAME = "name"
USER_PROJECT = "user-project-123"
Expand Down
2 changes: 1 addition & 1 deletion tasks/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version = '0.3.0'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
'grpc-google-iam-v1 >= 0.11.4, < 0.12dev',
'enum34; python_version < "3.4"',
]
Expand Down
2 changes: 1 addition & 1 deletion texttospeech/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
]
extras = {
}
Expand Down
Loading

0 comments on commit 2842fa8

Please sign in to comment.