Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-azure-storage-blob for openSUSE:Factory checked in at 2023-10-11 23:56:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-azure-storage-blob (Old) and /work/SRC/openSUSE:Factory/.python-azure-storage-blob.new.1807 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-azure-storage-blob" Wed Oct 11 23:56:25 2023 rev:28 rq:1116920 version:12.18.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-azure-storage-blob/python-azure-storage-blob.changes 2023-10-05 20:04:43.630124941 +0200 +++ /work/SRC/openSUSE:Factory/.python-azure-storage-blob.new.1807/python-azure-storage-blob.changes 2023-10-12 11:52:18.947245297 +0200 @@ -1,0 +2,8 @@ +Wed Oct 11 09:14:58 UTC 2023 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- New upstream release + + Version 12.18.3 + + For detailed information about changes see the + CHANGELOG.md file provided with this package + +------------------------------------------------------------------- Old: ---- azure-storage-blob-12.18.1.tar.gz New: ---- azure-storage-blob-12.18.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-azure-storage-blob.spec ++++++ --- /var/tmp/diff_new_pack.Ng1hPE/_old 2023-10-12 11:52:19.419262115 +0200 +++ /var/tmp/diff_new_pack.Ng1hPE/_new 2023-10-12 11:52:19.423262258 +0200 @@ -21,7 +21,7 @@ %define skip_python2 1 %endif Name: python-azure-storage-blob -Version: 12.18.1 +Version: 12.18.3 Release: 0 Summary: Microsoft Azure Storage Blob Client Library for Python License: MIT ++++++ azure-storage-blob-12.18.1.tar.gz -> azure-storage-blob-12.18.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/CHANGELOG.md new/azure-storage-blob-12.18.3/CHANGELOG.md --- old/azure-storage-blob-12.18.1/CHANGELOG.md 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/CHANGELOG.md 2023-10-10 23:34:03.000000000 +0200 @@ -1,5 +1,17 @@ # Release History +## 12.18.3 (2023-10-10) + +### Bugs Fixed +- Fixed an issue when an invalid type was provided for `credential` during client construction, the +`__str__` of the object would be present in the exception message and therefore potentially logged. + +## 12.18.2 (2023-09-25) + +### Bugs Fixed +- Fixed an issue where `user_agent` was being ignored on `upload_blob` or `download_blob` if client was configured +for encryption. + ## 12.18.1 (2023-09-13) ### Bugs Fixed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/PKG-INFO new/azure-storage-blob-12.18.3/PKG-INFO --- old/azure-storage-blob-12.18.1/PKG-INFO 2023-09-13 23:19:53.780467300 +0200 +++ new/azure-storage-blob-12.18.3/PKG-INFO 2023-10-10 23:34:56.812399400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-storage-blob -Version: 12.18.1 +Version: 12.18.3 Summary: Microsoft Azure Blob Storage Client Library for Python Home-page: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob Author: Microsoft Corporation @@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Classifier: License :: OSI Approved :: MIT License Requires-Python: >=3.7 Description-Content-Type: text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/azure/storage/blob/_blob_client.py new/azure-storage-blob-12.18.3/azure/storage/blob/_blob_client.py --- old/azure-storage-blob-12.18.1/azure/storage/blob/_blob_client.py 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/azure/storage/blob/_blob_client.py 2023-10-10 23:34:03.000000000 +0200 @@ -1005,7 +1005,8 @@ This operations returns a BlobQueryReader, users need to use readall() or readinto() to get query data. :param str query_expression: - Required. a query statement. + Required. a query statement. For more details see + https://learn.microsoft.com/azure/storage/blobs/query-acceleration-sql-reference. :keyword Callable[~azure.storage.blob.BlobQueryError] on_error: A function to be called on any processing errors returned by the service. :keyword blob_format: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/azure/storage/blob/_encryption.py new/azure-storage-blob-12.18.3/azure/storage/blob/_encryption.py --- old/azure-storage-blob-12.18.1/azure/storage/blob/_encryption.py 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/azure/storage/blob/_encryption.py 2023-10-10 23:34:03.000000000 +0200 @@ -286,13 +286,23 @@ :param str encryption_version: The version of encryption being used. :param Dict[str, Any] request_options: The reuqest options to add the user agent override to. """ + # If the user has specified user_agent_overwrite=True, don't make any modifications + if request_options.get('user_agent_overwrite'): + return + + # If the feature flag is already present, don't add it again feature_flag = f"azstorage-clientsideencryption/{encryption_version}" - if feature_flag not in user_agent: - index = user_agent.find(f"azsdk-python-{moniker}") - user_agent = f"{user_agent[:index]}{feature_flag} {user_agent[index:]}" + if feature_flag in user_agent: + return + + index = user_agent.find(f"azsdk-python-{moniker}") + user_agent = f"{user_agent[:index]}{feature_flag} {user_agent[index:]}" + # Since we are using user_agent_overwrite=True, we must prepend the user's user_agent if there is one + if request_options.get('user_agent'): + user_agent = f"{request_options.get('user_agent')} {user_agent}" - request_options['user_agent'] = user_agent - request_options['user_agent_overwrite'] = True + request_options['user_agent'] = user_agent + request_options['user_agent_overwrite'] = True def get_adjusted_upload_size(length: int, encryption_version: str) -> int: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/azure/storage/blob/_shared/base_client.py new/azure-storage-blob-12.18.3/azure/storage/blob/_shared/base_client.py --- old/azure-storage-blob-12.18.1/azure/storage/blob/_shared/base_client.py 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/azure/storage/blob/_shared/base_client.py 2023-10-10 23:34:03.000000000 +0200 @@ -227,7 +227,7 @@ elif isinstance(credential, AzureSasCredential): self._credential_policy = AzureSasCredentialPolicy(credential) elif credential is not None: - raise TypeError(f"Unsupported credential: {credential}") + raise TypeError(f"Unsupported credential: {type(credential)}") config = kwargs.get("_configuration") or create_configuration(**kwargs) if kwargs.get("_pipeline"): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/azure/storage/blob/_shared/base_client_async.py new/azure-storage-blob-12.18.3/azure/storage/blob/_shared/base_client_async.py --- old/azure-storage-blob-12.18.1/azure/storage/blob/_shared/base_client_async.py 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/azure/storage/blob/_shared/base_client_async.py 2023-10-10 23:34:03.000000000 +0200 @@ -75,7 +75,7 @@ elif isinstance(credential, AzureSasCredential): self._credential_policy = AzureSasCredentialPolicy(credential) elif credential is not None: - raise TypeError(f"Unsupported credential: {credential}") + raise TypeError(f"Unsupported credential: {type(credential)}") config = kwargs.get('_configuration') or create_configuration(**kwargs) if kwargs.get('_pipeline'): return config, kwargs['_pipeline'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/azure/storage/blob/_version.py new/azure-storage-blob-12.18.3/azure/storage/blob/_version.py --- old/azure-storage-blob-12.18.1/azure/storage/blob/_version.py 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/azure/storage/blob/_version.py 2023-10-10 23:34:03.000000000 +0200 @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.18.1" +VERSION = "12.18.3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/azure_storage_blob.egg-info/PKG-INFO new/azure-storage-blob-12.18.3/azure_storage_blob.egg-info/PKG-INFO --- old/azure-storage-blob-12.18.1/azure_storage_blob.egg-info/PKG-INFO 2023-09-13 23:19:53.000000000 +0200 +++ new/azure-storage-blob-12.18.3/azure_storage_blob.egg-info/PKG-INFO 2023-10-10 23:34:56.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-storage-blob -Version: 12.18.1 +Version: 12.18.3 Summary: Microsoft Azure Blob Storage Client Library for Python Home-page: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob Author: Microsoft Corporation @@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Classifier: License :: OSI Approved :: MIT License Requires-Python: >=3.7 Description-Content-Type: text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/setup.py new/azure-storage-blob-12.18.3/setup.py --- old/azure-storage-blob-12.18.1/setup.py 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/setup.py 2023-10-10 23:34:03.000000000 +0200 @@ -64,6 +64,7 @@ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: MIT License', ], zip_safe=False, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/tests/test_blob_encryption_v2.py new/azure-storage-blob-12.18.3/tests/test_blob_encryption_v2.py --- old/azure-storage-blob-12.18.1/tests/test_blob_encryption_v2.py 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/tests/test_blob_encryption_v2.py 2023-10-10 23:34:03.000000000 +0200 @@ -1066,9 +1066,23 @@ storage_account_key = kwargs.pop("storage_account_key") self._setup(storage_account_name, storage_account_key) + kek = KeyWrapper('key1') + self.enable_encryption_v2(kek) app_id = 'TestAppId' - kek = KeyWrapper('key1') + content = b'Hello World Encrypted!' + + def assert_user_agent(request): + start = f'{app_id} azstorage-clientsideencryption/2.0 ' + assert request.http_request.headers['User-Agent'].startswith(start) + + # Test method level keyword + blob = self.bsc.get_blob_client(self.container_name, self._get_blob_reference()) + + blob.upload_blob(content, overwrite=True, raw_request_hook=assert_user_agent, user_agent=app_id) + blob.download_blob(raw_request_hook=assert_user_agent, user_agent=app_id).readall() + + # Test client constructor level keyword bsc = BlobServiceClient( self.bsc.url, credential=storage_account_key, @@ -1077,13 +1091,7 @@ key_encryption_key=kek, user_agent=app_id) - def assert_user_agent(request): - start = f'{app_id} azstorage-clientsideencryption/2.0 ' - assert request.http_request.headers['User-Agent'].startswith(start) - blob = bsc.get_blob_client(self.container_name, self._get_blob_reference()) - content = b'Hello World Encrypted!' - # Act blob.upload_blob(content, overwrite=True, raw_request_hook=assert_user_agent) blob.download_blob(raw_request_hook=assert_user_agent).readall() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-storage-blob-12.18.1/tests/test_blob_encryption_v2_async.py new/azure-storage-blob-12.18.3/tests/test_blob_encryption_v2_async.py --- old/azure-storage-blob-12.18.1/tests/test_blob_encryption_v2_async.py 2023-09-13 23:18:55.000000000 +0200 +++ new/azure-storage-blob-12.18.3/tests/test_blob_encryption_v2_async.py 2023-10-10 23:34:03.000000000 +0200 @@ -1067,9 +1067,24 @@ storage_account_key = kwargs.pop("storage_account_key") await self._setup(storage_account_name, storage_account_key) + kek = KeyWrapper('key1') + self.enable_encryption_v2(kek) app_id = 'TestAppId' - kek = KeyWrapper('key1') + content = b'Hello World Encrypted!' + + def assert_user_agent(request): + start = f'{app_id} azstorage-clientsideencryption/2.0 ' + assert request.http_request.headers['User-Agent'].startswith(start) + + # Test method level keyword + blob = self.bsc.get_blob_client(self.container_name, self._get_blob_reference()) + + with mock.patch('os.urandom', mock_urandom): + await blob.upload_blob(content, overwrite=True, raw_request_hook=assert_user_agent, user_agent=app_id) + await (await blob.download_blob(raw_request_hook=assert_user_agent, user_agent=app_id)).readall() + + # Test client constructor level keyword bsc = BlobServiceClient( self.bsc.url, credential=storage_account_key, @@ -1078,14 +1093,8 @@ key_encryption_key=kek, user_agent=app_id) - def assert_user_agent(request): - start = f'{app_id} azstorage-clientsideencryption/2.0 ' - assert request.http_request.headers['User-Agent'].startswith(start) - blob = bsc.get_blob_client(self.container_name, self._get_blob_reference()) - content = b'Hello World Encrypted!' - # Act with mock.patch('os.urandom', mock_urandom): await blob.upload_blob(content, overwrite=True, raw_request_hook=assert_user_agent) await (await blob.download_blob(raw_request_hook=assert_user_agent)).readall()