8282from google .cloud .storage .retry import DEFAULT_RETRY
8383from google .cloud .storage .retry import DEFAULT_RETRY_IF_ETAG_IN_JSON
8484from google .cloud .storage .retry import DEFAULT_RETRY_IF_GENERATION_SPECIFIED
85- from google .cloud .storage .retry import DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED
8685from google .cloud .storage .fileio import BlobReader
8786from google .cloud .storage .fileio import BlobWriter
8887
@@ -1703,10 +1702,10 @@ def _do_multipart_upload(
17031702 :type num_retries: int
17041703 :param num_retries:
17051704 Number of upload retries. By default, only uploads with
1706- if_metageneration_match set will be retried, as uploads without the
1705+ if_generation_match set will be retried, as uploads without the
17071706 argument are not guaranteed to be idempotent. Setting num_retries
17081707 will override this default behavior and guarantee retries even when
1709- if_metageneration_match is not set. (Deprecated: This argument
1708+ if_generation_match is not set. (Deprecated: This argument
17101709 will be removed in a future release.)
17111710
17121711 :type predefined_acl: str
@@ -1750,7 +1749,7 @@ def _do_multipart_upload(
17501749
17511750 This private method does not accept ConditionalRetryPolicy values
17521751 because the information necessary to evaluate the policy is instead
1753- evaluated in client.download_blob_to_file ().
1752+ evaluated in blob._do_upload ().
17541753
17551754 See the retry.py source code and docstrings in this package
17561755 (google.cloud.storage.retry) for information on retry types and how
@@ -1877,10 +1876,10 @@ def _initiate_resumable_upload(
18771876 :type num_retries: int
18781877 :param num_retries:
18791878 Number of upload retries. By default, only uploads with
1880- if_metageneration_match set will be retried, as uploads without the
1879+ if_generation_match set will be retried, as uploads without the
18811880 argument are not guaranteed to be idempotent. Setting num_retries
18821881 will override this default behavior and guarantee retries even when
1883- if_metageneration_match is not set. (Deprecated: This argument
1882+ if_generation_match is not set. (Deprecated: This argument
18841883 will be removed in a future release.)
18851884
18861885 :type extra_headers: dict
@@ -1936,7 +1935,7 @@ def _initiate_resumable_upload(
19361935
19371936 This private method does not accept ConditionalRetryPolicy values
19381937 because the information necessary to evaluate the policy is instead
1939- evaluated in client.download_blob_to_file ().
1938+ evaluated in blob._do_upload ().
19401939
19411940 See the retry.py source code and docstrings in this package
19421941 (google.cloud.storage.retry) for information on retry types and how
@@ -2070,10 +2069,10 @@ def _do_resumable_upload(
20702069 :type num_retries: int
20712070 :param num_retries:
20722071 Number of upload retries. By default, only uploads with
2073- if_metageneration_match set will be retried, as uploads without the
2072+ if_generation_match set will be retried, as uploads without the
20742073 argument are not guaranteed to be idempotent. Setting num_retries
20752074 will override this default behavior and guarantee retries even when
2076- if_metageneration_match is not set. (Deprecated: This argument
2075+ if_generation_match is not set. (Deprecated: This argument
20772076 will be removed in a future release.)
20782077
20792078 :type predefined_acl: str
@@ -2119,7 +2118,7 @@ def _do_resumable_upload(
21192118
21202119 This private method does not accept ConditionalRetryPolicy values
21212120 because the information necessary to evaluate the policy is instead
2122- evaluated in client.download_blob_to_file ().
2121+ evaluated in blob._do_upload ().
21232122
21242123 See the retry.py source code and docstrings in this package
21252124 (google.cloud.storage.retry) for information on retry types and how
@@ -2204,10 +2203,10 @@ def _do_upload(
22042203 :type num_retries: int
22052204 :param num_retries:
22062205 Number of upload retries. By default, only uploads with
2207- if_metageneration_match set will be retried, as uploads without the
2206+ if_generation_match set will be retried, as uploads without the
22082207 argument are not guaranteed to be idempotent. Setting num_retries
22092208 will override this default behavior and guarantee retries even when
2210- if_metageneration_match is not set. (Deprecated: This argument
2209+ if_generation_match is not set. (Deprecated: This argument
22112210 will be removed in a future release.)
22122211
22132212 :type predefined_acl: str
@@ -2258,7 +2257,7 @@ def _do_upload(
22582257 This class exists to provide safe defaults for RPC calls that are
22592258 not technically safe to retry normally (due to potential data
22602259 duplication or other side-effects) but become safe to retry if a
2261- condition such as if_metageneration_match is set.
2260+ condition such as if_generation_match is set.
22622261
22632262 See the retry.py source code and docstrings in this package
22642263 (google.cloud.storage.retry) for information on retry types and how
@@ -2337,7 +2336,7 @@ def upload_from_file(
23372336 if_metageneration_not_match = None ,
23382337 timeout = _DEFAULT_TIMEOUT ,
23392338 checksum = None ,
2340- retry = DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED ,
2339+ retry = DEFAULT_RETRY_IF_GENERATION_SPECIFIED ,
23412340 ):
23422341 """Upload the contents of this blob from a file-like object.
23432342
@@ -2397,10 +2396,10 @@ def upload_from_file(
23972396 :type num_retries: int
23982397 :param num_retries:
23992398 Number of upload retries. By default, only uploads with
2400- if_metageneration_match set will be retried, as uploads without the
2399+ if_generation_match set will be retried, as uploads without the
24012400 argument are not guaranteed to be idempotent. Setting num_retries
24022401 will override this default behavior and guarantee retries even when
2403- if_metageneration_match is not set. (Deprecated: This argument
2402+ if_generation_match is not set. (Deprecated: This argument
24042403 will be removed in a future release.)
24052404
24062405 :type client: :class:`~google.cloud.storage.client.Client`
@@ -2456,7 +2455,7 @@ def upload_from_file(
24562455 This class exists to provide safe defaults for RPC calls that are
24572456 not technically safe to retry normally (due to potential data
24582457 duplication or other side-effects) but become safe to retry if a
2459- condition such as if_metageneration_match is set.
2458+ condition such as if_generation_match is set.
24602459
24612460 See the retry.py source code and docstrings in this package
24622461 (google.cloud.storage.retry) for information on retry types and how
@@ -2479,7 +2478,7 @@ def upload_from_file(
24792478 # num_retries and retry are mutually exclusive. If num_retries is
24802479 # set and retry is exactly the default, then nullify retry for
24812480 # backwards compatibility.
2482- if retry is DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED :
2481+ if retry is DEFAULT_RETRY_IF_GENERATION_SPECIFIED :
24832482 retry = None
24842483
24852484 _maybe_rewind (file_obj , rewind = rewind )
@@ -2518,7 +2517,7 @@ def upload_from_filename(
25182517 if_metageneration_not_match = None ,
25192518 timeout = _DEFAULT_TIMEOUT ,
25202519 checksum = None ,
2521- retry = DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED ,
2520+ retry = DEFAULT_RETRY_IF_GENERATION_SPECIFIED ,
25222521 ):
25232522 """Upload this blob's contents from the content of a named file.
25242523
@@ -2558,10 +2557,10 @@ def upload_from_filename(
25582557 :type num_retries: int
25592558 :param num_retries:
25602559 Number of upload retries. By default, only uploads with
2561- if_metageneration_match set will be retried, as uploads without the
2560+ if_generation_match set will be retried, as uploads without the
25622561 argument are not guaranteed to be idempotent. Setting num_retries
25632562 will override this default behavior and guarantee retries even when
2564- if_metageneration_match is not set. (Deprecated: This argument
2563+ if_generation_match is not set. (Deprecated: This argument
25652564 will be removed in a future release.)
25662565
25672566 :type predefined_acl: str
@@ -2612,7 +2611,7 @@ def upload_from_filename(
26122611 This class exists to provide safe defaults for RPC calls that are
26132612 not technically safe to retry normally (due to potential data
26142613 duplication or other side-effects) but become safe to retry if a
2615- condition such as if_metageneration_match is set.
2614+ condition such as if_generation_match is set.
26162615
26172616 See the retry.py source code and docstrings in this package
26182617 (google.cloud.storage.retry) for information on retry types and how
@@ -2656,7 +2655,7 @@ def upload_from_string(
26562655 if_metageneration_not_match = None ,
26572656 timeout = _DEFAULT_TIMEOUT ,
26582657 checksum = None ,
2659- retry = DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED ,
2658+ retry = DEFAULT_RETRY_IF_GENERATION_SPECIFIED ,
26602659 ):
26612660 """Upload contents of this blob from the provided string.
26622661
@@ -2687,10 +2686,10 @@ def upload_from_string(
26872686 :type num_retries: int
26882687 :param num_retries:
26892688 Number of upload retries. By default, only uploads with
2690- if_metageneration_match set will be retried, as uploads without the
2689+ if_generation_match set will be retried, as uploads without the
26912690 argument are not guaranteed to be idempotent. Setting num_retries
26922691 will override this default behavior and guarantee retries even when
2693- if_metageneration_match is not set. (Deprecated: This argument
2692+ if_generation_match is not set. (Deprecated: This argument
26942693 will be removed in a future release.)
26952694
26962695 :type client: :class:`~google.cloud.storage.client.Client`
@@ -2746,7 +2745,7 @@ def upload_from_string(
27462745 This class exists to provide safe defaults for RPC calls that are
27472746 not technically safe to retry normally (due to potential data
27482747 duplication or other side-effects) but become safe to retry if a
2749- condition such as if_metageneration_match is set.
2748+ condition such as if_generation_match is set.
27502749
27512750 See the retry.py source code and docstrings in this package
27522751 (google.cloud.storage.retry) for information on retry types and how
0 commit comments