From 60403da20403149e86e7c5f6ff754c34afe4e47a Mon Sep 17 00:00:00 2001 From: Cathy Ouyang Date: Thu, 29 Feb 2024 15:56:20 -0800 Subject: [PATCH 1/2] docs: update DEFAULT_RETRY_IF_GENERATION_SPECIFIED docstrings --- google/cloud/storage/blob.py | 129 +++++++++++++++------------------ google/cloud/storage/bucket.py | 40 +++++++++- 2 files changed, 96 insertions(+), 73 deletions(-) diff --git a/google/cloud/storage/blob.py b/google/cloud/storage/blob.py index 6cfa56190..76a389162 100644 --- a/google/cloud/storage/blob.py +++ b/google/cloud/storage/blob.py @@ -2759,26 +2759,19 @@ def upload_from_file( "md5", "crc32c" and None. The default is None. :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_generation_match is set. + :param retry: (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only uploads with ``if_generation_match`` or ``generation`` set will + be retried. - 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. + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if uploads are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). Media operations (downloads and uploads) do not support non-default - predicates in a Retry object. The default will always be used. Other - configuration changes for Retry objects such as delays and deadlines - are respected. + predicates in a Retry object. Other configuration changes for Retry objects + such as delays and deadlines are respected. :raises: :class:`~google.cloud.exceptions.GoogleCloudError` if the upload response returns an error status. @@ -2924,26 +2917,19 @@ def upload_from_filename( "md5", "crc32c" and None. The default is None. :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_generation_match is set. + :param retry: (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only uploads with ``if_generation_match`` or ``generation`` set will + be retried. - 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. + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if uploads are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). Media operations (downloads and uploads) do not support non-default - predicates in a Retry object. The default will always be used. Other - configuration changes for Retry objects such as delays and deadlines - are respected. + predicates in a Retry object. Other configuration changes for Retry objects + such as delays and deadlines are respected. """ self._handle_filename_and_upload( @@ -3053,26 +3039,19 @@ def upload_from_string( "md5", "crc32c" and None. The default is None. :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_generation_match is set. + :param retry: (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only uploads with ``if_generation_match`` or ``generation`` set will + be retried. - 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. + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if uploads are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). Media operations (downloads and uploads) do not support non-default - predicates in a Retry object. The default will always be used. Other - configuration changes for Retry objects such as delays and deadlines - are respected. + predicates in a Retry object. Other configuration changes for Retry objects + such as delays and deadlines are respected. """ data = _to_bytes(data, encoding="utf-8") string_buffer = BytesIO(data) @@ -3199,23 +3178,19 @@ def create_resumable_upload_session( (Optional) See :ref:`using-if-metageneration-not-match` :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_generation_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. + :param retry: (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only uploads with ``if_generation_match`` or ``generation`` set will + be retried. + + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if uploads are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). + Media operations (downloads and uploads) do not support non-default - predicates in a Retry object. The default will always be used. Other - configuration changes for Retry objects such as delays and deadlines - are respected. + predicates in a Retry object. Other configuration changes for Retry objects + such as delays and deadlines are respected. :rtype: str :returns: The resumable upload session URL. The upload can be @@ -3621,7 +3596,15 @@ def compose( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: - (Optional) How to retry the RPC. See: :ref:`configuring_retries` + (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only compose operations with ``if_generation_match`` or ``generation`` + set will be retried. + + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if compose operations are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). """ sources_len = len(sources) client = self._require_client(client) @@ -3783,7 +3766,15 @@ def rewrite( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: - (Optional) How to retry the RPC. See: :ref:`configuring_retries` + (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only rewrites with ``if_generation_match`` or ``generation`` set will + be retried. + + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if rewrites are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :rtype: tuple :returns: ``(token, bytes_rewritten, total_bytes)``, where ``token`` diff --git a/google/cloud/storage/bucket.py b/google/cloud/storage/bucket.py index caa3ddd57..644c52d0f 100644 --- a/google/cloud/storage/bucket.py +++ b/google/cloud/storage/bucket.py @@ -1631,7 +1631,15 @@ def delete_blob( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: - (Optional) How to retry the RPC. See: :ref:`configuring_retries` + (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only deletes with ``if_generation_match`` or ``generation`` set will + be retried. + + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if deletes are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :raises: :class:`google.cloud.exceptions.NotFound` Raises a NotFound if the blob isn't found. To suppress @@ -1732,7 +1740,15 @@ def delete_blobs( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: - (Optional) How to retry the RPC. See: :ref:`configuring_retries` + (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only delete operations with ``if_generation_match`` or ``generation`` set will + be retried. + + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if delete operations are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :raises: :class:`~google.cloud.exceptions.NotFound` (if `on_error` is not passed). @@ -1877,7 +1893,15 @@ def copy_blob( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: - (Optional) How to retry the RPC. See: :ref:`configuring_retries` + (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only copy operations with ``if_generation_match`` or ``generation`` + set will be retried. + + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if copy operations are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :rtype: :class:`google.cloud.storage.blob.Blob` :returns: The new Blob. @@ -2024,7 +2048,15 @@ def rename_blob( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: - (Optional) How to retry the RPC. See: :ref:`configuring_retries` + (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which + only rename operations with ``if_generation_match`` or ``generation`` + set will be retried. + + Users can configure non-default retry behavior. A ``None`` value will + disable retries. A ``DEFAULT_RETRY`` value will enable retries + even if rename operations are not guaranteed to be idempotent. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :rtype: :class:`Blob` :returns: The newly-renamed blob. From 6e9c5ab451496bab96df56b23f1b2c7dd0014af3 Mon Sep 17 00:00:00 2001 From: Cathy Ouyang Date: Mon, 8 Apr 2024 15:12:54 -0700 Subject: [PATCH 2/2] update docstrings --- google/cloud/storage/blob.py | 88 +++++++++++++++++----------------- google/cloud/storage/bucket.py | 48 ++++++++----------- 2 files changed, 64 insertions(+), 72 deletions(-) diff --git a/google/cloud/storage/blob.py b/google/cloud/storage/blob.py index 76a389162..5b3186294 100644 --- a/google/cloud/storage/blob.py +++ b/google/cloud/storage/blob.py @@ -777,7 +777,13 @@ def delete( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: - (Optional) How to retry the RPC. See: :ref:`configuring_retries` + (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :raises: :class:`google.cloud.exceptions.NotFound` (propagated from @@ -2760,13 +2766,11 @@ def upload_from_file( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only uploads with ``if_generation_match`` or ``generation`` set will - be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if uploads are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). Media operations (downloads and uploads) do not support non-default @@ -2918,13 +2922,11 @@ def upload_from_filename( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only uploads with ``if_generation_match`` or ``generation`` set will - be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if uploads are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). Media operations (downloads and uploads) do not support non-default @@ -3040,13 +3042,11 @@ def upload_from_string( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only uploads with ``if_generation_match`` or ``generation`` set will - be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if uploads are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). Media operations (downloads and uploads) do not support non-default @@ -3179,13 +3179,11 @@ def create_resumable_upload_session( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only uploads with ``if_generation_match`` or ``generation`` set will - be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if uploads are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). Media operations (downloads and uploads) do not support non-default @@ -3597,13 +3595,11 @@ def compose( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only compose operations with ``if_generation_match`` or ``generation`` - set will be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if compose operations are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). """ sources_len = len(sources) @@ -3767,13 +3763,11 @@ def rewrite( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only rewrites with ``if_generation_match`` or ``generation`` set will - be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if rewrites are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :rtype: tuple @@ -3934,7 +3928,13 @@ def update_storage_class( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: - (Optional) How to retry the RPC. See: :ref:`configuring_retries` + (Optional) How to retry the RPC. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. + See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). """ # Update current blob's storage class prior to rewrite self._patch_property("storageClass", new_class) diff --git a/google/cloud/storage/bucket.py b/google/cloud/storage/bucket.py index 644c52d0f..5ae4edaf6 100644 --- a/google/cloud/storage/bucket.py +++ b/google/cloud/storage/bucket.py @@ -1632,13 +1632,11 @@ def delete_blob( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only deletes with ``if_generation_match`` or ``generation`` set will - be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if deletes are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :raises: :class:`google.cloud.exceptions.NotFound` Raises a NotFound @@ -1741,13 +1739,11 @@ def delete_blobs( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only delete operations with ``if_generation_match`` or ``generation`` set will - be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if delete operations are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :raises: :class:`~google.cloud.exceptions.NotFound` (if @@ -1894,13 +1890,11 @@ def copy_blob( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only copy operations with ``if_generation_match`` or ``generation`` - set will be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if copy operations are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :rtype: :class:`google.cloud.storage.blob.Blob` @@ -2049,13 +2043,11 @@ def rename_blob( :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy :param retry: (Optional) How to retry the RPC. - The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, which - only rename operations with ``if_generation_match`` or ``generation`` - set will be retried. - - Users can configure non-default retry behavior. A ``None`` value will - disable retries. A ``DEFAULT_RETRY`` value will enable retries - even if rename operations are not guaranteed to be idempotent. + The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry + policy which will only enable retries if ``if_generation_match`` or ``generation`` + is set, in order to ensure requests are idempotent before retrying them. + Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object + to enable retries regardless of generation precondition setting. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout). :rtype: :class:`Blob`