diff --git a/sdk/storage/azure-storage-blob/HISTORY.md b/sdk/storage/azure-storage-blob/HISTORY.md index a8c7497fdd69..0f2ae0e5a7c4 100644 --- a/sdk/storage/azure-storage-blob/HISTORY.md +++ b/sdk/storage/azure-storage-blob/HISTORY.md @@ -1,5 +1,10 @@ # Change Log azure-storage-blob +## Version 12.0.0: + +**Breaking changes** + +- NoRetry policy has been removed. Use keyword argument `retry_total=0` for no retries. ## Version 12.0.0b4: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py index faebdc531559..3a2d77ae69d8 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py @@ -13,7 +13,7 @@ from .blob_service_client import BlobServiceClient from .lease import LeaseClient from .download import StorageStreamDownloader -from ._shared.policies import ExponentialRetry, LinearRetry, NoRetry +from ._shared.policies import ExponentialRetry, LinearRetry from ._shared.models import( LocationMode, ResourceTypes, @@ -65,7 +65,6 @@ 'UserDelegationKey', 'ExponentialRetry', 'LinearRetry', - 'NoRetry', 'LocationMode', 'BlockState', 'StandardBlobTier', diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py index cad4dabe7eff..5cc93d3e6a44 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py @@ -546,15 +546,6 @@ def send(self, request): return response -class NoRetry(StorageRetryPolicy): - - def __init__(self): - super(NoRetry, self).__init__(retry_total=0) - - def increment(self, *args, **kwargs): # pylint: disable=unused-argument,arguments-differ - return False - - class ExponentialRetry(StorageRetryPolicy): """Exponential retry.""" diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies_async.py index b84ba562b948..7337a976109e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies_async.py @@ -129,15 +129,6 @@ async def send(self, request): return response -class NoRetry(AsyncStorageRetryPolicy): - - def __init__(self): - super(NoRetry, self).__init__(retry_total=0) - - def increment(self, *args, **kwargs): # pylint: disable=unused-argument,arguments-differ - return False - - class ExponentialRetry(AsyncStorageRetryPolicy): """Exponential retry.""" diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/__init__.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/__init__.py index 28c9e388ab44..8f68faac5f79 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/__init__.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/__init__.py @@ -4,7 +4,7 @@ # license information. # -------------------------------------------------------------------------- -from .._shared.policies_async import ExponentialRetry, LinearRetry, NoRetry +from .._shared.policies_async import ExponentialRetry, LinearRetry from .._shared.models import( LocationMode, ResourceTypes, @@ -55,7 +55,6 @@ 'StorageErrorCode', 'ExponentialRetry', 'LinearRetry', - 'NoRetry', 'LocationMode', 'BlockState', 'StandardBlobTier', diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_no_retry.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_no_retry.yaml index 6270fa5a0951..d650e562f38e 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_no_retry.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_no_retry.yaml @@ -159,4 +159,84 @@ interactions: status: code: 202 message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - 7747f81c-ec78-11e9-b89b-b831b58100e8 + x-ms-date: + - Fri, 11 Oct 2019 22:42:55 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://blobstoragename.blob.core.windows.net/7d860a15?restype=container + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Fri, 11 Oct 2019 22:42:55 GMT + ETag: + - '"0x8D74E9C5B7D4C43"' + Last-Modified: + - Fri, 11 Oct 2019 22:42:55 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: + - e1252138-201e-0048-4585-80d76b000000 + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - 77696406-ec78-11e9-b716-b831b58100e8 + x-ms-date: + - Fri, 11 Oct 2019 22:42:55 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://blobstoragename.blob.core.windows.net/7d860a15?restype=container + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Fri, 11 Oct 2019 22:42:55 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: + - e1252187-201e-0048-0985-80d76b000000 + x-ms-version: + - '2019-02-02' + status: + code: 202 + message: Accepted version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_retry_async.test_no_retry_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_retry_async.test_no_retry_async.yaml index 578104f11e8c..1503988683fa 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_retry_async.test_no_retry_async.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_retry_async.test_no_retry_async.yaml @@ -87,4 +87,88 @@ interactions: - /17050f0f - restype=container - '' +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - 62330e10-ec78-11e9-a265-b831b58100e8 + x-ms-date: + - Fri, 11 Oct 2019 22:42:19 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://blobstoragename.blob.core.windows.net/17050f0f?restype=container + response: + body: + string: '' + headers: + ? !!python/object/new:multidict._istr.istr + - Content-Length + : '0' + ? !!python/object/new:multidict._istr.istr + - Date + : Fri, 11 Oct 2019 22:42:19 GMT + ? !!python/object/new:multidict._istr.istr + - Etag + : '"0x8D74E9C465E6131"' + ? !!python/object/new:multidict._istr.istr + - Last-Modified + : Fri, 11 Oct 2019 22:42:19 GMT + ? !!python/object/new:multidict._istr.istr + - Server + : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 97182d73-c01e-0040-4a85-80cd64000000 + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - pythonstoragelivetest.blob.core.windows.net + - /17050f0f + - restype=container + - '' +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - 624ab50c-ec78-11e9-b8dd-b831b58100e8 + x-ms-date: + - Fri, 11 Oct 2019 22:42:20 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://blobstoragename.blob.core.windows.net/17050f0f?restype=container + response: + body: + string: '' + headers: + ? !!python/object/new:multidict._istr.istr + - Content-Length + : '0' + ? !!python/object/new:multidict._istr.istr + - Date + : Fri, 11 Oct 2019 22:42:19 GMT + ? !!python/object/new:multidict._istr.istr + - Server + : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 97182d8f-c01e-0040-6085-80cd64000000 + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - pythonstoragelivetest.blob.core.windows.net + - /17050f0f + - restype=container + - '' version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index b3c3a8667409..9cc95a003e64 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -20,7 +20,6 @@ LocationMode, LinearRetry, ExponentialRetry, - NoRetry ) from testcase import ( @@ -141,7 +140,7 @@ def test_no_retry(self): # Arrange container_name = self.get_resource_name() service = self._create_storage_service( - BlobServiceClient, self.settings, retry_policy=NoRetry()) + BlobServiceClient, self.settings, retry_total=0) # Force the create call to 'timeout' with a 408 diff --git a/sdk/storage/azure-storage-blob/tests/test_retry_async.py b/sdk/storage/azure-storage-blob/tests/test_retry_async.py index 8ed3f21ae5a2..e6304e75f915 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry_async.py @@ -24,7 +24,6 @@ LocationMode, LinearRetry, ExponentialRetry, - NoRetry ) from testcase import ( @@ -177,7 +176,7 @@ async def _test_no_retry_async(self): # Arrange container_name = self.get_resource_name() service = self._create_storage_service( - BlobServiceClient, self.settings, retry_policy=NoRetry(), transport=AiohttpTestTransport()) + BlobServiceClient, self.settings, retry_total=0, transport=AiohttpTestTransport()) # Force the create call to 'timeout' with a 408 diff --git a/sdk/storage/azure-storage-file/HISTORY.md b/sdk/storage/azure-storage-file/HISTORY.md index f6c58c60b66b..dbefaedaa9e0 100644 --- a/sdk/storage/azure-storage-file/HISTORY.md +++ b/sdk/storage/azure-storage-file/HISTORY.md @@ -1,5 +1,11 @@ # Change Log azure-storage-file +## Version 12.0.0: + +**Breaking changes** + +- NoRetry policy has been removed. Use keyword argument `retry_total=0` for no retries. + ## Version 12.0.0b4: **Breaking changes** diff --git a/sdk/storage/azure-storage-file/azure/storage/file/__init__.py b/sdk/storage/azure-storage-file/azure/storage/file/__init__.py index 60ead35414e2..adb4c6fea314 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/__init__.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/__init__.py @@ -9,7 +9,7 @@ from .directory_client import DirectoryClient from .share_client import ShareClient from .file_service_client import FileServiceClient -from ._shared.policies import ExponentialRetry, LinearRetry, NoRetry +from ._shared.policies import ExponentialRetry, LinearRetry from ._shared.models import( LocationMode, ResourceTypes, @@ -45,7 +45,6 @@ 'FileServiceClient', 'ExponentialRetry', 'LinearRetry', - 'NoRetry', 'LocationMode', 'ResourceTypes', 'AccountSasPermissions', diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies.py b/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies.py index cad4dabe7eff..5cc93d3e6a44 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies.py @@ -546,15 +546,6 @@ def send(self, request): return response -class NoRetry(StorageRetryPolicy): - - def __init__(self): - super(NoRetry, self).__init__(retry_total=0) - - def increment(self, *args, **kwargs): # pylint: disable=unused-argument,arguments-differ - return False - - class ExponentialRetry(StorageRetryPolicy): """Exponential retry.""" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies_async.py b/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies_async.py index b84ba562b948..7337a976109e 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies_async.py @@ -129,15 +129,6 @@ async def send(self, request): return response -class NoRetry(AsyncStorageRetryPolicy): - - def __init__(self): - super(NoRetry, self).__init__(retry_total=0) - - def increment(self, *args, **kwargs): # pylint: disable=unused-argument,arguments-differ - return False - - class ExponentialRetry(AsyncStorageRetryPolicy): """Exponential retry.""" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/__init__.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/__init__.py index 03e0d3ba5ef8..6604d7e19181 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/__init__.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/__init__.py @@ -8,7 +8,7 @@ from .directory_client_async import DirectoryClient from .share_client_async import ShareClient from .file_service_client_async import FileServiceClient -from .._shared.policies_async import ExponentialRetry, LinearRetry, NoRetry +from .._shared.policies_async import ExponentialRetry, LinearRetry from .._shared.models import ( LocationMode, ResourceTypes, @@ -40,7 +40,6 @@ 'FileServiceClient', 'ExponentialRetry', 'LinearRetry', - 'NoRetry', 'LocationMode', 'ResourceTypes', 'AccountSasPermissions', diff --git a/sdk/storage/azure-storage-queue/HISTORY.md b/sdk/storage/azure-storage-queue/HISTORY.md index e24413b759d1..cca62f9116a2 100644 --- a/sdk/storage/azure-storage-queue/HISTORY.md +++ b/sdk/storage/azure-storage-queue/HISTORY.md @@ -1,5 +1,11 @@ # Change Log azure-storage-queue +## Version 12.0.0: + +**Breaking changes** + +- NoRetry policy has been removed. Use keyword argument `retry_total=0` for no retries. + ## Version 12.0.0b4: **Breaking changes** diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/__init__.py b/sdk/storage/azure-storage-queue/azure/storage/queue/__init__.py index 77c2c5872ef1..395913eaaaea 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/__init__.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/__init__.py @@ -7,7 +7,7 @@ from .version import VERSION from .queue_client import QueueClient from .queue_service_client import QueueServiceClient -from ._shared.policies import ExponentialRetry, LinearRetry, NoRetry +from ._shared.policies import ExponentialRetry, LinearRetry from ._shared.models import( LocationMode, ResourceTypes, @@ -44,7 +44,6 @@ 'QueueServiceClient', 'ExponentialRetry', 'LinearRetry', - 'NoRetry', 'LocationMode', 'ResourceTypes', 'AccountSasPermissions', diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py index cad4dabe7eff..5cc93d3e6a44 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py @@ -546,15 +546,6 @@ def send(self, request): return response -class NoRetry(StorageRetryPolicy): - - def __init__(self): - super(NoRetry, self).__init__(retry_total=0) - - def increment(self, *args, **kwargs): # pylint: disable=unused-argument,arguments-differ - return False - - class ExponentialRetry(StorageRetryPolicy): """Exponential retry.""" diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies_async.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies_async.py index b84ba562b948..7337a976109e 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies_async.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies_async.py @@ -129,15 +129,6 @@ async def send(self, request): return response -class NoRetry(AsyncStorageRetryPolicy): - - def __init__(self): - super(NoRetry, self).__init__(retry_total=0) - - def increment(self, *args, **kwargs): # pylint: disable=unused-argument,arguments-differ - return False - - class ExponentialRetry(AsyncStorageRetryPolicy): """Exponential retry."""