diff --git a/sdk/storage/azure-storage-blob/HISTORY.md b/sdk/storage/azure-storage-blob/HISTORY.md index 54c8c81dea47..6c7087107216 100644 --- a/sdk/storage/azure-storage-blob/HISTORY.md +++ b/sdk/storage/azure-storage-blob/HISTORY.md @@ -3,9 +3,30 @@ ## Version 12.0.0b2: -- Added async APIs to subnamespace `azure.storage.blob.aio`. +**Breaking changes** - Renamed `copy_blob_from_url` to `start_copy_from_url` and changed behaviour to return a dictionary of copy properties rather than a polling object. Status of the copy operation can be retrieved with the `get_blob_properties` operation. +- Added `abort_copy` operation to the `BlobClient` class. This replaces the previous abort operation on the copy status polling operation. +- The behavior of listing operations has been modified: + - The previous `marker` parameter has been removed. + - The iterable response object now supports a `by_page` function that will return a secondary iterator of batches of results. This function supports a `continuation_token` parameter to replace the previous `marker` parameter. +- Some parameters have become keyword only, rather than positional. Some examples include: + - `timeout` + - `lease` + - `encoding` + - Modification conditions, e.g. `if_modified_since`, `if_match` , `maxsize_condition`, etc + +**New features** +- Added async APIs to subnamespace `azure.storage.blob.aio`. +- Distributed tracing framework OpenCensus is now supported. + +**Dependency updates** +- Adopted [azure-core](https://pypi.org/project/azure-core/) 1.0.0b2 + - If you later want to revert to azure-storage-blob 12.0.0b1, or another Azure SDK + library requiring azure-core 1.0.0b1, you'll need to `pip uninstall azure-core` +**Fixes and improvements** +- Fix for SAS URL encoding (#6500) +- General refactor of duplicate and shared code. ## Version 12.0.0b1: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/version.py b/sdk/storage/azure-storage-blob/azure/storage/blob/version.py index 62cb7bc47ca2..9ed9f5528271 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/version.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.0.0b1" +VERSION = "12.0.0b2" diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_client.py b/sdk/storage/azure-storage-blob/tests/test_blob_client.py index 7e7a7ad5b680..3f6a8b026406 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_client.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_client.py @@ -8,6 +8,7 @@ import platform from azure.storage.blob import ( + VERSION, BlobServiceClient, ContainerClient, BlobClient, @@ -396,7 +397,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-blob/12.0.0b1 Python/{} ({})".format( + "azsdk-python-storage-blob/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -412,7 +414,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v1.0 azsdk-python-storage-blob/12.0.0b1 Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-storage-blob/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -422,7 +425,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v2.0 azsdk-python-storage-blob/12.0.0b1 Python/{} ({})".format( + "TestApp/v2.0 azsdk-python-storage-blob/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -436,7 +440,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-blob/12.0.0b1 Python/{} ({}) customer_user_agent".format( + "azsdk-python-storage-blob/{} Python/{} ({}) customer_user_agent".format( + VERSION, platform.python_version(), platform.platform())) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_client_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_client_async.py index 85e2ba8be905..6eb7917c242f 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_client_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_client_async.py @@ -8,6 +8,7 @@ import platform import asyncio +from azure.storage.blob import VERSION from azure.storage.blob.aio import ( BlobServiceClient, ContainerClient, @@ -418,7 +419,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-blob/12.0.0b1 Python/{} ({})".format( + "azsdk-python-storage-blob/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -438,7 +440,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v1.0 azsdk-python-storage-blob/12.0.0b1 Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-storage-blob/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -448,7 +451,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v2.0 azsdk-python-storage-blob/12.0.0b1 Python/{} ({})".format( + "TestApp/v2.0 azsdk-python-storage-blob/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -466,7 +470,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-blob/12.0.0b1 Python/{} ({}) customer_user_agent".format( + "azsdk-python-storage-blob/{} Python/{} ({}) customer_user_agent".format( + VERSION, platform.python_version(), platform.platform())) diff --git a/sdk/storage/azure-storage-file/HISTORY.md b/sdk/storage/azure-storage-file/HISTORY.md index ddfd38f55699..c0979b74ace4 100644 --- a/sdk/storage/azure-storage-file/HISTORY.md +++ b/sdk/storage/azure-storage-file/HISTORY.md @@ -1,5 +1,32 @@ # Change Log azure-storage-file + +## Version 12.0.0b2: + +**Breaking changes** +- Renamed `copy_file_from_url` to `start_copy_from_url` and changed behaviour to return a dictionary of copy properties rather than a polling object. Status of the copy operation can be retrieved with the `get_file_properties` operation. +- Added `abort_copy` operation to the `FileClient` class. This replaces the previous abort operation on the copy status polling operation. +- The behavior of listing operations has been modified: + - The previous `marker` parameter has been removed. + - The iterable response object now supports a `by_page` function that will return a secondary iterator of batches of results. This function supports a `continuation_token` parameter to replace the previous `marker` parameter. +- The new listing behaviour is also adopted by the `receive_messages` operation: + - The receive operation returns a message iterator as before. + - The returned iterator supports a `by_page` operation to receive messages in batches. + +**New features** +- Added async APIs to subnamespace `azure.storage.file.aio`. +- Distributed tracing framework OpenCensus is now supported. + +**Dependency updates** +- Adopted [azure-core](https://pypi.org/project/azure-core/) 1.0.0b2 + - If you later want to revert to azure-storage-file 12.0.0b1, or another Azure SDK + library requiring azure-core 1.0.0b1, you'll need to `pip uninstall azure-core` + +**Fixes and improvements** +- Fix for closing file handles - continuation token was not being passed to subsequent calls. +- General refactor of duplicate and shared code. + + ## Version 12.0.0b1: Version 12.0.0b1 is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure Storage Files. For more information about this, and preview releases of other Azure SDK libraries, please visit diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_polling.py b/sdk/storage/azure-storage-file/azure/storage/file/_polling.py index eade3e93394b..d956616c2a71 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_polling.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/_polling.py @@ -19,23 +19,23 @@ class CloseHandles(PollingMethod): def __init__(self, interval): self._command = None - self._status = None + self._continuation_token = None self._exception = None self.handles_closed = 0 self.polling_interval = interval def _update_status(self): try: - status = self._command() # pylint: disable=protected-access + status = self._command(marker=self._continuation_token) except StorageErrorException as error: process_storage_error(error) - self._status = status.get('marker') - self.handles_closed += status['number_of_handles_closed'] + self._continuation_token = status.get('marker') + self.handles_closed += status.get('number_of_handles_closed') or 0 def initialize(self, command, initial_status, _): # pylint: disable=arguments-differ # type: (Any, Any, Callable) -> None self._command = command - self._status = initial_status['marker'] + self._continuation_token = initial_status['marker'] self.handles_closed = initial_status['number_of_handles_closed'] def run(self): @@ -57,7 +57,7 @@ def finished(self): """Is this polling finished? :rtype: bool """ - return self._status is None + return self._continuation_token is None def resource(self): # type: () -> Any diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/_polling_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/_polling_async.py index d4d631b06438..faa60276d1af 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/_polling_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/_polling_async.py @@ -20,23 +20,23 @@ class CloseHandlesAsync(AsyncPollingMethod): def __init__(self, interval): self._command = None - self._status = None + self._continuation_token = None self._exception = None self.handles_closed = 0 self.polling_interval = interval async def _update_status(self): try: - status = await self._command() # pylint: disable=protected-access + status = await self._command(marker=self._continuation_token) except StorageErrorException as error: process_storage_error(error) - self._status = status.get('marker') - self.handles_closed += status['number_of_handles_closed'] + self._continuation_token = status.get('marker') + self.handles_closed += status.get('number_of_handles_closed') or 0 def initialize(self, command, initial_status, _): # pylint: disable=arguments-differ # type: (Any, Any, Callable) -> None self._command = command - self._status = initial_status['marker'] + self._continuation_token = initial_status['marker'] self.handles_closed = initial_status['number_of_handles_closed'] async def run(self): @@ -57,7 +57,7 @@ def finished(self): """Is this polling finished? :rtype: bool """ - return self._status is None + return self._continuation_token is None def resource(self): # type: () -> Any diff --git a/sdk/storage/azure-storage-file/azure/storage/file/version.py b/sdk/storage/azure-storage-file/azure/storage/file/version.py index 71af5012673a..71d7316d2679 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/version.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = '12.0.0b1' +VERSION = '12.0.0b2' diff --git a/sdk/storage/azure-storage-file/tests/test_file_async.py b/sdk/storage/azure-storage-file/tests/test_file_async.py index 27a10b14ba46..5a2187b3d33c 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_async.py +++ b/sdk/storage/azure-storage-file/tests/test_file_async.py @@ -77,7 +77,7 @@ def setUp(self): self.fsc2 = FileServiceClient(remote_url, credential=remote_credential, transport=AiohttpTestTransport()) self.remote_share_name = None loop = asyncio.get_event_loop() - loop.run_until_complete(self.fsc.__aenter__()) + loop.run_until_complete(self.fsc2.__aenter__()) def tearDown(self): if not self.is_playback(): diff --git a/sdk/storage/azure-storage-file/tests/test_file_client.py b/sdk/storage/azure-storage-file/tests/test_file_client.py index e082115746d0..a551fb728f2b 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_client.py +++ b/sdk/storage/azure-storage-file/tests/test_file_client.py @@ -7,6 +7,7 @@ import platform from azure.storage.file import ( + VERSION, FileServiceClient, ShareClient, DirectoryClient, @@ -134,7 +135,7 @@ def test_create_service_missing_arguments(self): for service_type in SERVICES: # Act with self.assertRaises(ValueError): - service = service_type(None) + service_type(None) def test_create_service_with_socket_timeout(self): # Arrange @@ -204,11 +205,11 @@ def test_create_service_with_connection_string_endpoint_protocol(self): def test_create_service_with_connection_string_emulated(self): # Arrange for service_type in SERVICES.items(): - conn_string = 'UseDevelopmentStorage=true;'.format(self.account_name, self.account_key) + conn_string = 'UseDevelopmentStorage=true;' # Act with self.assertRaises(ValueError): - service = service_type[0].from_connection_string( + service_type[0].from_connection_string( conn_string, share='foo', directory_path='bar', file_path='baz') def test_create_service_with_connection_string_fails_if_secondary_without_primary(self): @@ -221,7 +222,7 @@ def test_create_service_with_connection_string_fails_if_secondary_without_primar # Fails if primary excluded with self.assertRaises(ValueError): - service = service_type[0].from_connection_string( + service_type[0].from_connection_string( conn_string, share='foo', directory_path='bar', file_path='baz') def test_create_service_with_connection_string_succeeds_if_secondary_with_primary(self): @@ -251,7 +252,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-file/12.0.0b1 Python/{} ({})".format( + "azsdk-python-storage-file/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -263,25 +265,27 @@ def test_user_agent_custom(self): service = FileServiceClient( self.get_file_url(), credential=self.account_key, user_agent=custom_app) - def callback(response): + def callback1(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v1.0 azsdk-python-storage-file/12.0.0b1 Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-storage-file/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) - service.get_service_properties(raw_response_hook=callback) + service.get_service_properties(raw_response_hook=callback1) - def callback(response): + def callback2(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v2.0 azsdk-python-storage-file/12.0.0b1 Python/{} ({})".format( + "TestApp/v2.0 azsdk-python-storage-file/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) - service.get_service_properties(raw_response_hook=callback, user_agent="TestApp/v2.0") + service.get_service_properties(raw_response_hook=callback2, user_agent="TestApp/v2.0") @record def test_user_agent_append(self): @@ -291,7 +295,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-file/12.0.0b1 Python/{} ({}) customer_user_agent".format( + "azsdk-python-storage-file/{} Python/{} ({}) customer_user_agent".format( + VERSION, platform.python_version(), platform.platform())) diff --git a/sdk/storage/azure-storage-file/tests/test_file_client_async.py b/sdk/storage/azure-storage-file/tests/test_file_client_async.py index 903470815ff7..7cfed6edde24 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_client_async.py +++ b/sdk/storage/azure-storage-file/tests/test_file_client_async.py @@ -8,6 +8,7 @@ import asyncio from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy +from azure.storage.file import VERSION from azure.storage.file.aio import ( FileServiceClient, ShareClient, @@ -154,7 +155,7 @@ def test_create_service_missing_arguments_async(self): for service_type in SERVICES: # Act with self.assertRaises(ValueError): - service = service_type(None) + service_type(None) @record def test_create_service_with_socket_timeout_async(self): @@ -229,11 +230,11 @@ def test_create_service_with_connection_string_endpoint_protocol_async(self): def test_create_service_with_connection_string_emulated_async(self): # Arrange for service_type in SERVICES.items(): - conn_string = 'UseDevelopmentStorage=true;'.format(self.account_name, self.account_key) + conn_string = 'UseDevelopmentStorage=true;' # Act with self.assertRaises(ValueError): - service = service_type[0].from_connection_string( + service_type[0].from_connection_string( conn_string, share='foo', directory_path='bar', file_path='baz', transport=AiohttpTestTransport()) @record @@ -247,7 +248,7 @@ def test_create_service_with_connection_string_fails_if_secondary_without_primar # Fails if primary excluded with self.assertRaises(ValueError): - service = service_type[0].from_connection_string( + service_type[0].from_connection_string( conn_string, share='foo', directory_path='bar', file_path='baz') @record @@ -277,7 +278,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-file/12.0.0b1 Python/{} ({})".format( + "azsdk-python-storage-file/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -293,25 +295,27 @@ async def _test_user_agent_custom_async(self): service = FileServiceClient( self.get_file_url(), credential=self.account_key, user_agent=custom_app, transport=AiohttpTestTransport()) - def callback(response): + def callback1(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v1.0 azsdk-python-storage-file/12.0.0b1 Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-storage-file/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) - await service.get_service_properties(raw_response_hook=callback) + await service.get_service_properties(raw_response_hook=callback1) - def callback(response): + def callback2(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v2.0 azsdk-python-storage-file/12.0.0b1 Python/{} ({})".format( + "TestApp/v2.0 azsdk-python-storage-file/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) - await service.get_service_properties(raw_response_hook=callback, user_agent="TestApp/v2.0") + await service.get_service_properties(raw_response_hook=callback2, user_agent="TestApp/v2.0") @record def test_user_agent_custom_async(self): @@ -325,7 +329,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-file/12.0.0b1 Python/{} ({}) customer_user_agent".format( + "azsdk-python-storage-file/{} Python/{} ({}) customer_user_agent".format( + VERSION, platform.python_version(), platform.platform())) diff --git a/sdk/storage/azure-storage-queue/HISTORY.md b/sdk/storage/azure-storage-queue/HISTORY.md index fb51bf467be5..ce8c1f082b2d 100644 --- a/sdk/storage/azure-storage-queue/HISTORY.md +++ b/sdk/storage/azure-storage-queue/HISTORY.md @@ -1,5 +1,29 @@ # Change Log azure-storage-queue + +## Version 12.0.0b2: + +**Breaking changes** +- The behavior of listing operations has been modified: + - The previous `marker` parameter has been removed. + - The iterable response object now supports a `by_page` function that will return a secondary iterator of batches of results. This function supports a `continuation_token` parameter to replace the previous `marker` parameter. +- The new listing behaviour is also adopted by the `receive_messages` operation: + - The receive operation returns a message iterator as before. + - The returned iterator supports a `by_page` operation to receive messages in batches. + +**New features** +- Added async APIs to subnamespace `azure.storage.queue.aio`. +- Distributed tracing framework OpenCensus is now supported. + +**Dependency updates** +- Adopted [azure-core](https://pypi.org/project/azure-core/) 1.0.0b2 + - If you later want to revert to azure-storage-queue 12.0.0b1, or another Azure SDK + library requiring azure-core 1.0.0b1, you'll need to `pip uninstall azure-core` + +**Fixes and improvements** +- General refactor of duplicate and shared code. + + ## Version 12.0.0b1: Version 12.0.0b1 is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure Storage Queues. For more information about this, and preview releases of other Azure SDK libraries, please visit diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/version.py b/sdk/storage/azure-storage-queue/azure/storage/queue/version.py index 7e711ce3c0bd..5853dad9df60 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/version.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "12.0.0b1" +VERSION = "12.0.0b2" diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_client.py b/sdk/storage/azure-storage-queue/tests/test_queue_client.py index 8178e59a1756..d6284cefd6d6 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_client.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_client.py @@ -8,6 +8,7 @@ import platform from azure.storage.queue import ( + VERSION, QueueServiceClient, QueueClient, ) @@ -352,7 +353,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-queue/12.0.0b1 Python/{} ({})".format( + "azsdk-python-storage-queue/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -368,7 +370,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v1.0 azsdk-python-storage-queue/12.0.0b1 Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-storage-queue/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -378,7 +381,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v2.0 azsdk-python-storage-queue/12.0.0b1 Python/{} ({})".format( + "TestApp/v2.0 azsdk-python-storage-queue/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -392,7 +396,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-queue/12.0.0b1 Python/{} ({}) customer_user_agent".format( + "azsdk-python-storage-queue/{} Python/{} ({}) customer_user_agent".format( + VERSION, platform.python_version(), platform.platform())) diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_client_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_client_async.py index b7cbd16dc0c4..efc694ada9f0 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_client_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_client_async.py @@ -9,6 +9,7 @@ import asyncio from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy +from azure.storage.queue import VERSION from azure.storage.queue.aio import ( QueueServiceClient, QueueClient @@ -374,7 +375,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-queue/12.0.0b1 Python/{} ({})".format( + "azsdk-python-storage-queue/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -394,7 +396,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v1.0 azsdk-python-storage-queue/12.0.0b1 Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-storage-queue/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -404,7 +407,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v2.0 azsdk-python-storage-queue/12.0.0b1 Python/{} ({})".format( + "TestApp/v2.0 azsdk-python-storage-queue/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform())) @@ -422,7 +426,8 @@ def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-queue/12.0.0b1 Python/{} ({}) customer_user_agent".format( + "azsdk-python-storage-queue/{} Python/{} ({}) customer_user_agent".format( + VERSION, platform.python_version(), platform.platform()))