82
82
from google .cloud .storage .retry import DEFAULT_RETRY
83
83
from google .cloud .storage .retry import DEFAULT_RETRY_IF_ETAG_IN_JSON
84
84
from google .cloud .storage .retry import DEFAULT_RETRY_IF_GENERATION_SPECIFIED
85
- from google .cloud .storage .retry import DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED
86
85
from google .cloud .storage .fileio import BlobReader
87
86
from google .cloud .storage .fileio import BlobWriter
88
87
@@ -1703,10 +1702,10 @@ def _do_multipart_upload(
1703
1702
:type num_retries: int
1704
1703
:param num_retries:
1705
1704
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
1707
1706
argument are not guaranteed to be idempotent. Setting num_retries
1708
1707
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
1710
1709
will be removed in a future release.)
1711
1710
1712
1711
:type predefined_acl: str
@@ -1750,7 +1749,7 @@ def _do_multipart_upload(
1750
1749
1751
1750
This private method does not accept ConditionalRetryPolicy values
1752
1751
because the information necessary to evaluate the policy is instead
1753
- evaluated in client.download_blob_to_file ().
1752
+ evaluated in blob._do_upload ().
1754
1753
1755
1754
See the retry.py source code and docstrings in this package
1756
1755
(google.cloud.storage.retry) for information on retry types and how
@@ -1877,10 +1876,10 @@ def _initiate_resumable_upload(
1877
1876
:type num_retries: int
1878
1877
:param num_retries:
1879
1878
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
1881
1880
argument are not guaranteed to be idempotent. Setting num_retries
1882
1881
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
1884
1883
will be removed in a future release.)
1885
1884
1886
1885
:type extra_headers: dict
@@ -1936,7 +1935,7 @@ def _initiate_resumable_upload(
1936
1935
1937
1936
This private method does not accept ConditionalRetryPolicy values
1938
1937
because the information necessary to evaluate the policy is instead
1939
- evaluated in client.download_blob_to_file ().
1938
+ evaluated in blob._do_upload ().
1940
1939
1941
1940
See the retry.py source code and docstrings in this package
1942
1941
(google.cloud.storage.retry) for information on retry types and how
@@ -2070,10 +2069,10 @@ def _do_resumable_upload(
2070
2069
:type num_retries: int
2071
2070
:param num_retries:
2072
2071
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
2074
2073
argument are not guaranteed to be idempotent. Setting num_retries
2075
2074
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
2077
2076
will be removed in a future release.)
2078
2077
2079
2078
:type predefined_acl: str
@@ -2119,7 +2118,7 @@ def _do_resumable_upload(
2119
2118
2120
2119
This private method does not accept ConditionalRetryPolicy values
2121
2120
because the information necessary to evaluate the policy is instead
2122
- evaluated in client.download_blob_to_file ().
2121
+ evaluated in blob._do_upload ().
2123
2122
2124
2123
See the retry.py source code and docstrings in this package
2125
2124
(google.cloud.storage.retry) for information on retry types and how
@@ -2204,10 +2203,10 @@ def _do_upload(
2204
2203
:type num_retries: int
2205
2204
:param num_retries:
2206
2205
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
2208
2207
argument are not guaranteed to be idempotent. Setting num_retries
2209
2208
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
2211
2210
will be removed in a future release.)
2212
2211
2213
2212
:type predefined_acl: str
@@ -2258,7 +2257,7 @@ def _do_upload(
2258
2257
This class exists to provide safe defaults for RPC calls that are
2259
2258
not technically safe to retry normally (due to potential data
2260
2259
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.
2262
2261
2263
2262
See the retry.py source code and docstrings in this package
2264
2263
(google.cloud.storage.retry) for information on retry types and how
@@ -2337,7 +2336,7 @@ def upload_from_file(
2337
2336
if_metageneration_not_match = None ,
2338
2337
timeout = _DEFAULT_TIMEOUT ,
2339
2338
checksum = None ,
2340
- retry = DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED ,
2339
+ retry = DEFAULT_RETRY_IF_GENERATION_SPECIFIED ,
2341
2340
):
2342
2341
"""Upload the contents of this blob from a file-like object.
2343
2342
@@ -2397,10 +2396,10 @@ def upload_from_file(
2397
2396
:type num_retries: int
2398
2397
:param num_retries:
2399
2398
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
2401
2400
argument are not guaranteed to be idempotent. Setting num_retries
2402
2401
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
2404
2403
will be removed in a future release.)
2405
2404
2406
2405
:type client: :class:`~google.cloud.storage.client.Client`
@@ -2456,7 +2455,7 @@ def upload_from_file(
2456
2455
This class exists to provide safe defaults for RPC calls that are
2457
2456
not technically safe to retry normally (due to potential data
2458
2457
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.
2460
2459
2461
2460
See the retry.py source code and docstrings in this package
2462
2461
(google.cloud.storage.retry) for information on retry types and how
@@ -2479,7 +2478,7 @@ def upload_from_file(
2479
2478
# num_retries and retry are mutually exclusive. If num_retries is
2480
2479
# set and retry is exactly the default, then nullify retry for
2481
2480
# backwards compatibility.
2482
- if retry is DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED :
2481
+ if retry is DEFAULT_RETRY_IF_GENERATION_SPECIFIED :
2483
2482
retry = None
2484
2483
2485
2484
_maybe_rewind (file_obj , rewind = rewind )
@@ -2518,7 +2517,7 @@ def upload_from_filename(
2518
2517
if_metageneration_not_match = None ,
2519
2518
timeout = _DEFAULT_TIMEOUT ,
2520
2519
checksum = None ,
2521
- retry = DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED ,
2520
+ retry = DEFAULT_RETRY_IF_GENERATION_SPECIFIED ,
2522
2521
):
2523
2522
"""Upload this blob's contents from the content of a named file.
2524
2523
@@ -2558,10 +2557,10 @@ def upload_from_filename(
2558
2557
:type num_retries: int
2559
2558
:param num_retries:
2560
2559
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
2562
2561
argument are not guaranteed to be idempotent. Setting num_retries
2563
2562
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
2565
2564
will be removed in a future release.)
2566
2565
2567
2566
:type predefined_acl: str
@@ -2612,7 +2611,7 @@ def upload_from_filename(
2612
2611
This class exists to provide safe defaults for RPC calls that are
2613
2612
not technically safe to retry normally (due to potential data
2614
2613
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.
2616
2615
2617
2616
See the retry.py source code and docstrings in this package
2618
2617
(google.cloud.storage.retry) for information on retry types and how
@@ -2656,7 +2655,7 @@ def upload_from_string(
2656
2655
if_metageneration_not_match = None ,
2657
2656
timeout = _DEFAULT_TIMEOUT ,
2658
2657
checksum = None ,
2659
- retry = DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED ,
2658
+ retry = DEFAULT_RETRY_IF_GENERATION_SPECIFIED ,
2660
2659
):
2661
2660
"""Upload contents of this blob from the provided string.
2662
2661
@@ -2687,10 +2686,10 @@ def upload_from_string(
2687
2686
:type num_retries: int
2688
2687
:param num_retries:
2689
2688
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
2691
2690
argument are not guaranteed to be idempotent. Setting num_retries
2692
2691
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
2694
2693
will be removed in a future release.)
2695
2694
2696
2695
:type client: :class:`~google.cloud.storage.client.Client`
@@ -2746,7 +2745,7 @@ def upload_from_string(
2746
2745
This class exists to provide safe defaults for RPC calls that are
2747
2746
not technically safe to retry normally (due to potential data
2748
2747
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.
2750
2749
2751
2750
See the retry.py source code and docstrings in this package
2752
2751
(google.cloud.storage.retry) for information on retry types and how
0 commit comments