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 2024-04-17 16:20:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-storage-blob (Old)
 and      /work/SRC/openSUSE:Factory/.python-azure-storage-blob.new.26366 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-azure-storage-blob"

Wed Apr 17 16:20:30 2024 rev:31 rq:1168572 version:12.19.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-azure-storage-blob/python-azure-storage-blob.changes
      2024-04-07 22:12:38.769192937 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-azure-storage-blob.new.26366/python-azure-storage-blob.changes
   2024-04-17 16:24:24.880709551 +0200
@@ -1,0 +2,8 @@
+Wed Apr 17 10:44:00 UTC 2024 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- New upstream release
+  + Version 12.19.1
+  + For detailed information about changes see the
+    CHANGELOG.md file provided with this package
+
+-------------------------------------------------------------------

Old:
----
  azure-storage-blob-12.19.0.tar.gz

New:
----
  azure-storage-blob-12.19.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-azure-storage-blob.spec ++++++
--- /var/tmp/diff_new_pack.6iUtPw/_old  2024-04-17 16:24:25.292724623 +0200
+++ /var/tmp/diff_new_pack.6iUtPw/_new  2024-04-17 16:24:25.292724623 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-azure-storage-blob
-Version:        12.19.0
+Version:        12.19.1
 Release:        0
 Summary:        Microsoft Azure Storage Blob Client Library for Python
 License:        MIT

++++++ azure-storage-blob-12.19.0.tar.gz -> azure-storage-blob-12.19.1.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-blob-12.19.0/CHANGELOG.md 
new/azure-storage-blob-12.19.1/CHANGELOG.md
--- old/azure-storage-blob-12.19.0/CHANGELOG.md 2023-11-07 23:29:15.000000000 
+0100
+++ new/azure-storage-blob-12.19.1/CHANGELOG.md 2024-03-05 23:59:18.000000000 
+0100
@@ -1,5 +1,11 @@
 # Release History
 
+## 12.19.1 (2024-03-04)
+
+### Bugs Fixed
+- Fixed an issue where under rare circumstances, full downloads of sparse Page 
Blobs could result in the
+downloaded content containing up to one "chunk" of extra `\x00` at the end due 
to an optimization error.
+
 ## 12.19.0 (2023-11-07)
 
 ### Features Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-blob-12.19.0/PKG-INFO 
new/azure-storage-blob-12.19.1/PKG-INFO
--- old/azure-storage-blob-12.19.0/PKG-INFO     2023-11-07 23:30:02.553336100 
+0100
+++ new/azure-storage-blob-12.19.1/PKG-INFO     2024-03-06 00:00:05.484781700 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-storage-blob
-Version: 12.19.0
+Version: 12.19.1
 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-blob-12.19.0/azure/storage/blob/_download.py 
new/azure-storage-blob-12.19.1/azure/storage/blob/_download.py
--- old/azure-storage-blob-12.19.0/azure/storage/blob/_download.py      
2023-11-07 23:29:15.000000000 +0100
+++ new/azure-storage-blob-12.19.1/azure/storage/blob/_download.py      
2024-03-05 23:59:18.000000000 +0100
@@ -186,7 +186,8 @@
         # No need to download the empty chunk from server if there's no data 
in the chunk to be downloaded.
         # Do optimize and create empty chunk locally if condition is met.
         if self._do_optimize(download_range[0], download_range[1]):
-            chunk_data = b"\x00" * self.chunk_size
+            data_size = download_range[1] - download_range[0] + 1
+            chunk_data = b"\x00" * data_size
         else:
             range_header, range_validation = validate_and_format_range_headers(
                 download_range[0],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-blob-12.19.0/azure/storage/blob/_generated/py.typed 
new/azure-storage-blob-12.19.1/azure/storage/blob/_generated/py.typed
--- old/azure-storage-blob-12.19.0/azure/storage/blob/_generated/py.typed       
1970-01-01 01:00:00.000000000 +0100
+++ new/azure-storage-blob-12.19.1/azure/storage/blob/_generated/py.typed       
2024-03-05 23:59:18.000000000 +0100
@@ -0,0 +1 @@
+# Marker file for PEP 561.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-blob-12.19.0/azure/storage/blob/_version.py 
new/azure-storage-blob-12.19.1/azure/storage/blob/_version.py
--- old/azure-storage-blob-12.19.0/azure/storage/blob/_version.py       
2023-11-07 23:29:15.000000000 +0100
+++ new/azure-storage-blob-12.19.1/azure/storage/blob/_version.py       
2024-03-05 23:59:18.000000000 +0100
@@ -4,4 +4,4 @@
 # license information.
 # --------------------------------------------------------------------------
 
-VERSION = "12.19.0"
+VERSION = "12.19.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-blob-12.19.0/azure/storage/blob/aio/_download_async.py 
new/azure-storage-blob-12.19.1/azure/storage/blob/aio/_download_async.py
--- old/azure-storage-blob-12.19.0/azure/storage/blob/aio/_download_async.py    
2023-11-07 23:29:15.000000000 +0100
+++ new/azure-storage-blob-12.19.1/azure/storage/blob/aio/_download_async.py    
2024-03-05 23:59:18.000000000 +0100
@@ -95,7 +95,8 @@
         # No need to download the empty chunk from server if there's no data 
in the chunk to be downloaded.
         # Do optimize and create empty chunk locally if condition is met.
         if self._do_optimize(download_range[0], download_range[1]):
-            chunk_data = b"\x00" * self.chunk_size
+            data_size = download_range[1] - download_range[0] + 1
+            chunk_data = b"\x00" * data_size
         else:
             range_header, range_validation = validate_and_format_range_headers(
                 download_range[0],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-blob-12.19.0/azure_storage_blob.egg-info/PKG-INFO 
new/azure-storage-blob-12.19.1/azure_storage_blob.egg-info/PKG-INFO
--- old/azure-storage-blob-12.19.0/azure_storage_blob.egg-info/PKG-INFO 
2023-11-07 23:30:02.000000000 +0100
+++ new/azure-storage-blob-12.19.1/azure_storage_blob.egg-info/PKG-INFO 
2024-03-06 00:00:05.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-storage-blob
-Version: 12.19.0
+Version: 12.19.1
 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-blob-12.19.0/azure_storage_blob.egg-info/SOURCES.txt 
new/azure-storage-blob-12.19.1/azure_storage_blob.egg-info/SOURCES.txt
--- old/azure-storage-blob-12.19.0/azure_storage_blob.egg-info/SOURCES.txt      
2023-11-07 23:30:02.000000000 +0100
+++ new/azure-storage-blob-12.19.1/azure_storage_blob.egg-info/SOURCES.txt      
2024-03-06 00:00:05.000000000 +0100
@@ -29,6 +29,7 @@
 azure/storage/blob/_generated/_patch.py
 azure/storage/blob/_generated/_serialization.py
 azure/storage/blob/_generated/_vendor.py
+azure/storage/blob/_generated/py.typed
 azure/storage/blob/_generated/aio/__init__.py
 azure/storage/blob/_generated/aio/_azure_blob_storage.py
 azure/storage/blob/_generated/aio/_configuration.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-blob-12.19.0/tests/test_page_blob.py 
new/azure-storage-blob-12.19.1/tests/test_page_blob.py
--- old/azure-storage-blob-12.19.0/tests/test_page_blob.py      2023-11-07 
23:29:15.000000000 +0100
+++ new/azure-storage-blob-12.19.1/tests/test_page_blob.py      2024-03-05 
23:59:18.000000000 +0100
@@ -2271,6 +2271,45 @@
 
     @BlobPreparer()
     @recorded_by_proxy
+    def test_download_sparse_page_blob_uneven_chunks(self, **kwargs):
+        storage_account_name = kwargs.pop("storage_account_name")
+        storage_account_key = kwargs.pop("storage_account_key")
+
+        # Arrange
+        bsc = BlobServiceClient(self.account_url(storage_account_name, 
"blob"), credential=storage_account_key)
+        self._setup(bsc)
+
+        # Choose an initial size, chunk size, and blob size, so the last chunk 
spills over end of blob
+        self.config.max_single_get_size = 4 * 1024
+        self.config.max_chunk_get_size = 4 * 1024
+        sparse_page_blob_size = 10 * 1024
+
+        blob_client = self._get_blob_reference(bsc)
+        blob_client.create_page_blob(sparse_page_blob_size)
+
+        data = b'12345678' * 128  # 1024 bytes
+        range_start = 2 * 1024 + 512
+        blob_client.upload_page(data, offset=range_start, length=len(data))
+
+        # Act
+        content = blob_client.download_blob().readall()
+
+        # Assert
+        assert sparse_page_blob_size == len(content)
+        start = end = 0
+        for r in blob_client.list_page_ranges():
+            if not r.cleared:
+                start = r.start
+                end = r.end
+
+        assert data == content[start: end + 1]
+        for byte in content[:start - 1]:
+            assert byte == 0
+        for byte in content[end + 1:]:
+            assert byte == 0
+
+    @BlobPreparer()
+    @recorded_by_proxy
     def test_upload_progress_chunked_non_parallel(self, **kwargs):
         storage_account_name = kwargs.pop("storage_account_name")
         storage_account_key = kwargs.pop("storage_account_key")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-blob-12.19.0/tests/test_page_blob_async.py 
new/azure-storage-blob-12.19.1/tests/test_page_blob_async.py
--- old/azure-storage-blob-12.19.0/tests/test_page_blob_async.py        
2023-11-07 23:29:15.000000000 +0100
+++ new/azure-storage-blob-12.19.1/tests/test_page_blob_async.py        
2024-03-05 23:59:18.000000000 +0100
@@ -2240,6 +2240,45 @@
 
     @BlobPreparer()
     @recorded_by_proxy_async
+    async def test_download_sparse_page_blob_uneven_chunks(self, **kwargs):
+        storage_account_name = kwargs.pop("storage_account_name")
+        storage_account_key = kwargs.pop("storage_account_key")
+
+        # Arrange
+        bsc = BlobServiceClient(self.account_url(storage_account_name, 
"blob"), credential=storage_account_key)
+        await self._setup(bsc)
+
+        # Choose an initial size, chunk size, and blob size, so the last chunk 
spills over end of blob
+        self.config.max_single_get_size = 4 * 1024
+        self.config.max_chunk_get_size = 4 * 1024
+        sparse_page_blob_size = 10 * 1024
+
+        blob_client = self._get_blob_reference(bsc)
+        await blob_client.create_page_blob(sparse_page_blob_size)
+
+        data = b'12345678' * 128  # 1024 bytes
+        range_start = 2 * 1024 + 512
+        await blob_client.upload_page(data, offset=range_start, 
length=len(data))
+
+        # Act
+        content = await (await blob_client.download_blob()).readall()
+
+        # Assert
+        assert sparse_page_blob_size == len(content)
+        start = end = 0
+        async for r in blob_client.list_page_ranges():
+            if not r.cleared:
+                start = r.start
+                end = r.end
+
+        assert data == content[start: end + 1]
+        for byte in content[:start - 1]:
+            assert byte == 0
+        for byte in content[end + 1:]:
+            assert byte == 0
+
+    @BlobPreparer()
+    @recorded_by_proxy_async
     async def test_upload_progress_chunked_non_parallel(self, **kwargs):
         storage_account_name = kwargs.pop("storage_account_name")
         storage_account_key = kwargs.pop("storage_account_key")

Reply via email to