From 2232f38933dbdfeb4f6585291794d332771ffdf2 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 8 Jun 2021 13:46:52 -0400 Subject: [PATCH] fix: apply idempotency policies for ACLs (#458) * fix: use 'retry=None' as default for 'Client._put_resource' * fix: use 'retry=None' as default for 'Client._patch_resource' * fix: force 'retry=None' for 'ACL.{save,save_predefined,clear}' * fix: remove 'retry' arg from 'Bucket.make_public' * fix: remove 'retry' arg from 'Bucket.make_private' * fix: remove 'retry' arg from 'Blob.make_public' * fix: remove 'retry' arg from 'Blob.make_private' Per idempotency policy. --- google/cloud/storage/acl.py | 49 +++++------------------------- google/cloud/storage/blob.py | 40 +++---------------------- google/cloud/storage/bucket.py | 54 +++++----------------------------- google/cloud/storage/client.py | 4 +-- tests/unit/test_acl.py | 31 +++++++++---------- tests/unit/test_blob.py | 18 +++++------- tests/unit/test_bucket.py | 36 +++++++++++------------ tests/unit/test_client.py | 4 +-- 8 files changed, 62 insertions(+), 174 deletions(-) diff --git a/google/cloud/storage/acl.py b/google/cloud/storage/acl.py index ec6c5bed9..bdb17bfc9 100644 --- a/google/cloud/storage/acl.py +++ b/google/cloud/storage/acl.py @@ -474,9 +474,7 @@ def reload(self, client=None, timeout=_DEFAULT_TIMEOUT, retry=DEFAULT_RETRY): for entry in found.get("items", ()): self.add_entity(self.entity_from_dict(entry)) - def _save( - self, acl, predefined, client, timeout=_DEFAULT_TIMEOUT, retry=DEFAULT_RETRY, - ): + def _save(self, acl, predefined, client, timeout=_DEFAULT_TIMEOUT): """Helper for :meth:`save` and :meth:`save_predefined`. :type acl: :class:`google.cloud.storage.acl.ACL`, or a compatible list. @@ -524,7 +522,7 @@ def _save( {self._URL_PATH_ELEM: list(acl)}, query_params=query_params, timeout=timeout, - retry=retry, + retry=None, ) self.entities.clear() @@ -534,9 +532,7 @@ def _save( self.loaded = True - def save( - self, acl=None, client=None, timeout=_DEFAULT_TIMEOUT, retry=DEFAULT_RETRY - ): + def save(self, acl=None, client=None, timeout=_DEFAULT_TIMEOUT): """Save this ACL for the current bucket. If :attr:`user_project` is set, bills the API request to that project. @@ -555,15 +551,6 @@ def save( Can also be passed as a tuple (connect_timeout, read_timeout). See :meth:`requests.Session.request` documentation for details. - - :type retry: :class:`~google.api_core.retry.Retry` - :param retry: (Optional) How to retry the RPC. - - A None value will disable retries. - - A google.api_core.retry.Retry value will enable retries, - and the object will define retriable response codes and errors - and configure backoff and timeout options. """ if acl is None: acl = self @@ -572,11 +559,9 @@ def save( save_to_backend = True if save_to_backend: - self._save(acl, None, client, timeout=timeout, retry=retry) + self._save(acl, None, client, timeout=timeout) - def save_predefined( - self, predefined, client=None, timeout=_DEFAULT_TIMEOUT, retry=DEFAULT_RETRY, - ): + def save_predefined(self, predefined, client=None, timeout=_DEFAULT_TIMEOUT): """Save this ACL for the current bucket using a predefined ACL. If :attr:`user_project` is set, bills the API request to that project. @@ -598,20 +583,11 @@ def save_predefined( Can also be passed as a tuple (connect_timeout, read_timeout). See :meth:`requests.Session.request` documentation for details. - - :type retry: :class:`~google.api_core.retry.Retry` - :param retry: (Optional) How to retry the RPC. - - A None value will disable retries. - - A google.api_core.retry.Retry value will enable retries, - and the object will define retriable response codes and errors - and configure backoff and timeout options. """ predefined = self.validate_predefined(predefined) - self._save(None, predefined, client, timeout=timeout, retry=retry) + self._save(None, predefined, client, timeout=timeout) - def clear(self, client=None, timeout=_DEFAULT_TIMEOUT, retry=DEFAULT_RETRY): + def clear(self, client=None, timeout=_DEFAULT_TIMEOUT): """Remove all ACL entries. If :attr:`user_project` is set, bills the API request to that project. @@ -631,17 +607,8 @@ def clear(self, client=None, timeout=_DEFAULT_TIMEOUT, retry=DEFAULT_RETRY): Can also be passed as a tuple (connect_timeout, read_timeout). See :meth:`requests.Session.request` documentation for details. - - :type retry: :class:`~google.api_core.retry.Retry` - :param retry: (Optional) How to retry the RPC. - - A None value will disable retries. - - A google.api_core.retry.Retry value will enable retries, - and the object will define retriable response codes and errors - and configure backoff and timeout options. """ - self.save([], client=client, timeout=timeout, retry=retry) + self.save([], client=client, timeout=timeout) class BucketACL(ACL): diff --git a/google/cloud/storage/blob.py b/google/cloud/storage/blob.py index 73851ea02..fa3f5c7ac 100644 --- a/google/cloud/storage/blob.py +++ b/google/cloud/storage/blob.py @@ -2978,9 +2978,7 @@ def test_iam_permissions( return resp.get("permissions", []) - def make_public( - self, client=None, timeout=_DEFAULT_TIMEOUT, retry=DEFAULT_RETRY, - ): + def make_public(self, client=None, timeout=_DEFAULT_TIMEOUT): """Update blob's ACL, granting read access to anonymous users. :type client: :class:`~google.cloud.storage.client.Client` or @@ -2995,27 +2993,11 @@ def make_public( Can also be passed as a tuple (connect_timeout, read_timeout). See :meth:`requests.Session.request` documentation for details. - - :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy - :param retry: (Optional) How to retry the RPC. A None value will disable retries. - A google.api_core.retry.Retry value will enable retries, and the object will - define retriable response codes and errors and configure backoff and timeout options. - - A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a Retry object and - activates it only if certain conditions are met. This class exists to provide safe defaults - for RPC calls that are not technically safe to retry normally (due to potential data - duplication or other side-effects) but become safe to retry if a condition such as - if_metageneration_match is set. - - See the retry.py source code and docstrings in this package (google.cloud.storage.retry) for - information on retry types and how to configure them. """ self.acl.all().grant_read() - self.acl.save(client=client, timeout=timeout, retry=retry) + self.acl.save(client=client, timeout=timeout) - def make_private( - self, client=None, timeout=_DEFAULT_TIMEOUT, retry=DEFAULT_RETRY, - ): + def make_private(self, client=None, timeout=_DEFAULT_TIMEOUT): """Update blob's ACL, revoking read access for anonymous users. :type client: :class:`~google.cloud.storage.client.Client` or @@ -3030,23 +3012,9 @@ def make_private( Can also be passed as a tuple (connect_timeout, read_timeout). See :meth:`requests.Session.request` documentation for details. - - :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy - :param retry: (Optional) How to retry the RPC. A None value will disable retries. - A google.api_core.retry.Retry value will enable retries, and the object will - define retriable response codes and errors and configure backoff and timeout options. - - A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a Retry object and - activates it only if certain conditions are met. This class exists to provide safe defaults - for RPC calls that are not technically safe to retry normally (due to potential data - duplication or other side-effects) but become safe to retry if a condition such as - if_metageneration_match is set. - - See the retry.py source code and docstrings in this package (google.cloud.storage.retry) for - information on retry types and how to configure them. """ self.acl.all().revoke_read() - self.acl.save(client=client, timeout=timeout, retry=retry) + self.acl.save(client=client, timeout=timeout) def compose( self, diff --git a/google/cloud/storage/bucket.py b/google/cloud/storage/bucket.py index 7703dc234..9b5746f20 100644 --- a/google/cloud/storage/bucket.py +++ b/google/cloud/storage/bucket.py @@ -1996,7 +1996,7 @@ def copy_blob( ) if not preserve_acl: - new_blob.acl.save(acl={}, client=client, timeout=timeout, retry=retry) + new_blob.acl.save(acl={}, client=client, timeout=timeout) new_blob._set_properties(copy_result) return new_blob @@ -3021,12 +3021,7 @@ def test_iam_permissions( return resp.get("permissions", []) def make_public( - self, - recursive=False, - future=False, - client=None, - timeout=_DEFAULT_TIMEOUT, - retry=DEFAULT_RETRY, + self, recursive=False, future=False, client=None, timeout=_DEFAULT_TIMEOUT, ): """Update bucket's ACL, granting read access to anonymous users. @@ -3050,20 +3045,6 @@ def make_public( Can also be passed as a tuple (connect_timeout, read_timeout). See :meth:`requests.Session.request` documentation for details. - :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy - :param retry: (Optional) How to retry the RPC. A None value will disable retries. - A google.api_core.retry.Retry value will enable retries, and the object will - define retriable response codes and errors and configure backoff and timeout options. - - A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a Retry object and - activates it only if certain conditions are met. This class exists to provide safe defaults - for RPC calls that are not technically safe to retry normally (due to potential data - duplication or other side-effects) but become safe to retry if a condition such as - if_metageneration_match is set. - - See the retry.py source code and docstrings in this package (google.cloud.storage.retry) for - information on retry types and how to configure them. - :raises ValueError: If ``recursive`` is True, and the bucket contains more than 256 blobs. This is to prevent extremely long runtime of this @@ -3073,7 +3054,7 @@ def make_public( for each blob. """ self.acl.all().grant_read() - self.acl.save(client=client, timeout=timeout, retry=retry) + self.acl.save(client=client, timeout=timeout) if future: doa = self.default_object_acl @@ -3089,7 +3070,6 @@ def make_public( max_results=self._MAX_OBJECTS_FOR_ITERATION + 1, client=client, timeout=timeout, - retry=retry, ) ) if len(blobs) > self._MAX_OBJECTS_FOR_ITERATION: @@ -3104,15 +3084,10 @@ def make_public( for blob in blobs: blob.acl.all().grant_read() - blob.acl.save(client=client, timeout=timeout, retry=retry) + blob.acl.save(client=client, timeout=timeout) def make_private( - self, - recursive=False, - future=False, - client=None, - timeout=_DEFAULT_TIMEOUT, - retry=DEFAULT_RETRY, + self, recursive=False, future=False, client=None, timeout=_DEFAULT_TIMEOUT, ): """Update bucket's ACL, revoking read access for anonymous users. @@ -3137,20 +3112,6 @@ def make_private( Can also be passed as a tuple (connect_timeout, read_timeout). See :meth:`requests.Session.request` documentation for details. - :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy - :param retry: (Optional) How to retry the RPC. A None value will disable retries. - A google.api_core.retry.Retry value will enable retries, and the object will - define retriable response codes and errors and configure backoff and timeout options. - - A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a Retry object and - activates it only if certain conditions are met. This class exists to provide safe defaults - for RPC calls that are not technically safe to retry normally (due to potential data - duplication or other side-effects) but become safe to retry if a condition such as - if_metageneration_match is set. - - See the retry.py source code and docstrings in this package (google.cloud.storage.retry) for - information on retry types and how to configure them. - :raises ValueError: If ``recursive`` is True, and the bucket contains more than 256 blobs. This is to prevent extremely long runtime of this @@ -3160,7 +3121,7 @@ def make_private( for each blob. """ self.acl.all().revoke_read() - self.acl.save(client=client, timeout=timeout, retry=retry) + self.acl.save(client=client, timeout=timeout) if future: doa = self.default_object_acl @@ -3176,7 +3137,6 @@ def make_private( max_results=self._MAX_OBJECTS_FOR_ITERATION + 1, client=client, timeout=timeout, - retry=retry, ) ) if len(blobs) > self._MAX_OBJECTS_FOR_ITERATION: @@ -3191,7 +3151,7 @@ def make_private( for blob in blobs: blob.acl.all().revoke_read() - blob.acl.save(client=client, timeout=timeout, retry=retry) + blob.acl.save(client=client, timeout=timeout) def generate_upload_policy(self, conditions, expiration=None, client=None): """Create a signed upload policy for uploading objects. diff --git a/google/cloud/storage/client.py b/google/cloud/storage/client.py index 57c5b4103..41580dbdd 100644 --- a/google/cloud/storage/client.py +++ b/google/cloud/storage/client.py @@ -393,7 +393,7 @@ def _patch_resource( query_params=None, headers=None, timeout=_DEFAULT_TIMEOUT, - retry=DEFAULT_RETRY, + retry=None, _target_object=None, ): """Helper for bucket / blob methods making API 'PATCH' calls. @@ -464,7 +464,7 @@ def _put_resource( query_params=None, headers=None, timeout=_DEFAULT_TIMEOUT, - retry=DEFAULT_RETRY, + retry=None, _target_object=None, ): """Helper for bucket / blob methods making API 'PUT' calls. diff --git a/tests/unit/test_acl.py b/tests/unit/test_acl.py index a31b90840..aad44809e 100644 --- a/tests/unit/test_acl.py +++ b/tests/unit/test_acl.py @@ -646,7 +646,7 @@ class Derived(self._get_target_class()): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) def test_save_no_acl_w_timeout(self): @@ -673,10 +673,10 @@ def test_save_no_acl_w_timeout(self): expected_data, query_params=expected_query_params, timeout=timeout, - retry=DEFAULT_RETRY, + retry=None, ) - def test_save_w_acl_w_user_project_w_retry(self): + def test_save_w_acl_w_user_project(self): save_path = "/testing" user_project = "user-project-123" role1 = "role1" @@ -690,9 +690,8 @@ def test_save_w_acl_w_user_project_w_retry(self): acl.save_path = save_path acl.loaded = True acl.user_project = user_project - retry = mock.Mock(spec=[]) - acl.save(new_acl, client=client, retry=retry) + acl.save(new_acl, client=client) entries = list(acl) self.assertEqual(len(entries), 2) @@ -706,7 +705,7 @@ def test_save_w_acl_w_user_project_w_retry(self): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=retry, + retry=None, ) def test_save_prefefined_invalid(self): @@ -750,7 +749,7 @@ class Derived(self._get_target_class()): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) def test_save_predefined_w_XML_alias_w_timeout(self): @@ -780,10 +779,10 @@ def test_save_predefined_w_XML_alias_w_timeout(self): expected_data, query_params=expected_query_params, timeout=timeout, - retry=DEFAULT_RETRY, + retry=None, ) - def test_save_predefined_w_alternate_query_param_w_retry(self): + def test_save_predefined_w_alternate_query_param(self): # Cover case where subclass overrides _PREDEFINED_QUERY_PARAM save_path = "/testing" predefined = "publicRead" @@ -794,9 +793,8 @@ def test_save_predefined_w_alternate_query_param_w_retry(self): acl.save_path = save_path acl.loaded = True acl._PREDEFINED_QUERY_PARAM = "alternate" - retry = mock.Mock(spec=[]) - acl.save_predefined(predefined, client=client, retry=retry) + acl.save_predefined(predefined, client=client) entries = list(acl) self.assertEqual(len(entries), 0) @@ -811,7 +809,7 @@ def test_save_predefined_w_alternate_query_param_w_retry(self): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=retry, + retry=None, ) def test_clear_w_defaults(self): @@ -844,10 +842,10 @@ class Derived(self._get_target_class()): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) - def test_clear_w_explicit_client_w_timeout_w_retry(self): + def test_clear_w_explicit_client_w_timeout(self): save_path = "/testing" role1 = "role1" role2 = "role2" @@ -860,9 +858,8 @@ def test_clear_w_explicit_client_w_timeout_w_retry(self): acl.loaded = True acl.entity("allUsers", role1) timeout = 42 - retry = mock.Mock(spec=[]) - acl.clear(client=client, timeout=timeout, retry=retry) + acl.clear(client=client, timeout=timeout) self.assertEqual(list(acl), [sticky]) @@ -875,7 +872,7 @@ def test_clear_w_explicit_client_w_timeout_w_retry(self): expected_data, query_params=expected_query_params, timeout=timeout, - retry=retry, + retry=None, ) diff --git a/tests/unit/test_blob.py b/tests/unit/test_blob.py index 071033a45..44959f54f 100644 --- a/tests/unit/test_blob.py +++ b/tests/unit/test_blob.py @@ -3458,10 +3458,10 @@ def test_make_public_w_defaults(self): expected_patch_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) - def test_make_public_w_timeout_w_retry(self): + def test_make_public_w_timeout(self): from google.cloud.storage.acl import _ACLEntity blob_name = "blob-name" @@ -3473,9 +3473,8 @@ def test_make_public_w_timeout_w_retry(self): blob = self._make_one(blob_name, bucket=bucket) blob.acl.loaded = True timeout = 42 - retry = mock.Mock(spec=[]) - blob.make_public(timeout=timeout, retry=retry) + blob.make_public(timeout=timeout) self.assertEqual(list(blob.acl), permissive) @@ -3486,7 +3485,7 @@ def test_make_public_w_timeout_w_retry(self): expected_patch_data, query_params=expected_query_params, timeout=timeout, - retry=retry, + retry=None, ) def test_make_private_w_defaults(self): @@ -3510,10 +3509,10 @@ def test_make_private_w_defaults(self): expected_patch_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) - def test_make_private_w_timeout_w_retry(self): + def test_make_private_w_timeout(self): blob_name = "blob-name" no_permissions = [] api_response = {"acl": no_permissions} @@ -3523,9 +3522,8 @@ def test_make_private_w_timeout_w_retry(self): blob = self._make_one(blob_name, bucket=bucket) blob.acl.loaded = True timeout = 42 - retry = mock.Mock(spec=[]) - blob.make_private(timeout=timeout, retry=retry) + blob.make_private(timeout=timeout) self.assertEqual(list(blob.acl), no_permissions) @@ -3536,7 +3534,7 @@ def test_make_private_w_timeout_w_retry(self): expected_patch_data, query_params=expected_query_params, timeout=timeout, - retry=retry, + retry=None, ) def test_compose_wo_content_type_set(self): diff --git a/tests/unit/test_bucket.py b/tests/unit/test_bucket.py index 50fe02c0e..018d753f7 100644 --- a/tests/unit/test_bucket.py +++ b/tests/unit/test_bucket.py @@ -1792,7 +1792,7 @@ def test_copy_blob_w_preserve_acl_false_w_explicit_client(self): expected_patch_data, query_params=expected_patch_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY_IF_GENERATION_SPECIFIED, + retry=None, ) def test_copy_blob_w_name_and_user_project(self): @@ -2996,7 +2996,7 @@ def test_make_public_defaults(self): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) def _make_public_w_future_helper(self, default_object_acl_loaded=True): @@ -3029,7 +3029,7 @@ def _make_public_w_future_helper(self, default_object_acl_loaded=True): expected_kw = { "query_params": {"projection": "full"}, "timeout": self._get_default_timeout(), - "retry": DEFAULT_RETRY, + "retry": None, } client._patch_resource.assert_has_calls( [ @@ -3079,9 +3079,9 @@ def all(self): def grant_read(self): self._granted = True - def save(self, client=None, timeout=None, retry=None): + def save(self, client=None, timeout=None): _saved.append( - (self._bucket, self._name, self._granted, client, timeout, retry) + (self._bucket, self._name, self._granted, client, timeout) ) name = "name" @@ -3100,13 +3100,12 @@ def save(self, client=None, timeout=None, retry=None): client.list_blobs.return_value = list_blobs_response timeout = 42 - retry = mock.Mock(spec=[]) - bucket.make_public(recursive=True, timeout=timeout, retry=retry) + bucket.make_public(recursive=True, timeout=timeout) self.assertEqual(list(bucket.acl), permissive) self.assertEqual(list(bucket.default_object_acl), []) - self.assertEqual(_saved, [(bucket, blob_name, True, None, timeout, retry)]) + self.assertEqual(_saved, [(bucket, blob_name, True, None, timeout)]) expected_patch_data = {"acl": permissive} expected_patch_query_params = {"projection": "full"} @@ -3115,7 +3114,7 @@ def save(self, client=None, timeout=None, retry=None): expected_patch_data, query_params=expected_patch_query_params, timeout=timeout, - retry=retry, + retry=None, ) client.list_blobs.assert_called_once() @@ -3150,7 +3149,7 @@ def test_make_public_recursive_too_many(self): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) client.list_blobs.assert_called_once() @@ -3178,7 +3177,7 @@ def test_make_private_defaults(self): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) def _make_private_w_future_helper(self, default_object_acl_loaded=True): @@ -3212,7 +3211,7 @@ def _make_private_w_future_helper(self, default_object_acl_loaded=True): expected_kw = { "query_params": {"projection": "full"}, "timeout": self._get_default_timeout(), - "retry": DEFAULT_RETRY, + "retry": None, } client._patch_resource.assert_has_calls( [ @@ -3260,9 +3259,9 @@ def all(self): def revoke_read(self): self._granted = False - def save(self, client=None, timeout=None, retry=None): + def save(self, client=None, timeout=None): _saved.append( - (self._bucket, self._name, self._granted, client, timeout, retry) + (self._bucket, self._name, self._granted, client, timeout) ) name = "name" @@ -3281,13 +3280,12 @@ def save(self, client=None, timeout=None, retry=None): client.list_blobs.return_value = list_blobs_response timeout = 42 - retry = mock.Mock(spec=[]) - bucket.make_private(recursive=True, timeout=42, retry=retry) + bucket.make_private(recursive=True, timeout=42) self.assertEqual(list(bucket.acl), no_permissions) self.assertEqual(list(bucket.default_object_acl), []) - self.assertEqual(_saved, [(bucket, blob_name, False, None, timeout, retry)]) + self.assertEqual(_saved, [(bucket, blob_name, False, None, timeout)]) expected_patch_data = {"acl": no_permissions} expected_patch_query_params = {"projection": "full"} @@ -3296,7 +3294,7 @@ def save(self, client=None, timeout=None, retry=None): expected_patch_data, query_params=expected_patch_query_params, timeout=timeout, - retry=retry, + retry=None, ) client.list_blobs.assert_called_once() @@ -3330,7 +3328,7 @@ def test_make_private_recursive_too_many(self): expected_data, query_params=expected_query_params, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, ) client.list_blobs.assert_called_once() diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index 7a9c0e880..6b0bb1fb5 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -488,7 +488,7 @@ def test__patch_resource_miss_w_defaults(self): query_params=None, headers=None, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, _target_object=None, ) @@ -551,7 +551,7 @@ def test__put_resource_miss_w_defaults(self): query_params=None, headers=None, timeout=self._get_default_timeout(), - retry=DEFAULT_RETRY, + retry=None, _target_object=None, )