Skip to content

Commit 2674a2c

Browse files
authored
Merge pull request #328 from zezha-msft/hotfix-0.35.1
Hotfix 0.35.1
2 parents 127cf6a + 03415fa commit 2674a2c

File tree

623 files changed

+22078
-21928
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

623 files changed

+22078
-21928
lines changed

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
> See [BreakingChanges](BreakingChanges.md) for a detailed list of API breaks.
44
5+
## Version 0.35.1:
6+
7+
### Blob:
8+
- Fixed bug where calling create_from_* and and append_blob_from_* methods with no data fails.
9+
510
## Version 0.35.0:
611

712
### All:

azure/storage/_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import platform
1616

1717
__author__ = 'Microsoft Corp. <ptvshelp@microsoft.com>'
18-
__version__ = '0.35.0'
18+
__version__ = '0.35.1'
1919

2020
# x-ms-version for storage service.
2121
X_MS_VERSION = '2017-04-17'

azure/storage/blob/_upload_chunking.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ def __init__(self, blob_service, container_name, blob_name, blob_size,
171171
self.timeout = timeout
172172
self.encryptor = encryptor
173173
self.padder = padder
174+
self.last_modified = None
175+
self.etag = None
174176

175177
def get_chunk_streams(self):
176178
index = 0

azure/storage/blob/blockblobservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def create_blob_from_stream(
507507
if (self.key_encryption_key is not None) and (adjusted_count is not None):
508508
adjusted_count += (16 - (count % 16))
509509

510-
if adjusted_count and adjusted_count < self.MAX_SINGLE_PUT_SIZE:
510+
if adjusted_count is not None and (adjusted_count < self.MAX_SINGLE_PUT_SIZE):
511511
if progress_callback:
512512
progress_callback(0, count)
513513

azure/storage/blob/pageblobservice.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,9 @@ def create_blob_from_stream(
990990
encryption_data=encryption_data
991991
)
992992

993+
if count == 0:
994+
return response
995+
993996
# _upload_blob_chunks returns the block ids for block blobs so resource_properties
994997
# is passed as a parameter to get the last_modified and etag for page and append blobs.
995998
# this info is not needed for block_blobs since _put_block_list is called after which gets this info

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
# built documents.
5454
#
5555
# The short X.Y version.
56-
version = '0.35.0'
56+
version = '0.35.1'
5757
# The full version, including alpha/beta/rc tags.
58-
release = '0.35.0'
58+
release = '0.35.1'
5959

6060
# The language for content autogenerated by Sphinx. Refer to documentation
6161
# for a list of supported languages.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
setup(
4343
name='azure-storage',
44-
version='0.35.0',
44+
version='0.35.1',
4545
description='Microsoft Azure Storage Client Library for Python',
4646
long_description=open('README.rst', 'r').read(),
4747
license='Apache License 2.0',
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Connection: [keep-alive]
6+
Content-Length: ['0']
7+
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
8+
x-ms-blob-type: [AppendBlob]
9+
x-ms-client-request-id: [a93746cc-68f4-11e7-84ba-b8e8564491f6]
10+
x-ms-date: ['Sat, 15 Jul 2017 00:29:27 GMT']
11+
x-ms-version: ['2017-04-17']
12+
method: PUT
13+
uri: https://storagename.blob.core.windows.net/utcontainerb59f1281/blobb59f1281
14+
response:
15+
body: {string: ''}
16+
headers:
17+
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
18+
ETag: ['"0x8D4CB188E0207CD"']
19+
Last-Modified: ['Sat, 15 Jul 2017 00:29:28 GMT']
20+
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
21+
Transfer-Encoding: [chunked]
22+
x-ms-request-id: [07a0e5c6-0001-00d4-7101-fd1df4000000]
23+
x-ms-request-server-encrypted: ['true']
24+
x-ms-version: ['2017-04-17']
25+
status: {code: 201, message: Created}
26+
- request:
27+
body: null
28+
headers:
29+
Connection: [keep-alive]
30+
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
31+
x-ms-client-request-id: [a9572110-68f4-11e7-b84e-b8e8564491f6]
32+
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
33+
x-ms-range: [bytes=0-33554431]
34+
x-ms-version: ['2017-04-17']
35+
method: GET
36+
uri: https://storagename.blob.core.windows.net/utcontainerb59f1281/blobb59f1281
37+
response:
38+
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>InvalidRange</Code><Message>The\
39+
\ range specified is invalid for the current size of the resource.\nRequestId:07a0e5e6-0001-00d4-0c01-fd1df4000000\n\
40+
Time:2017-07-15T00:29:28.7981699Z</Message></Error>"}
41+
headers:
42+
Content-Length: ['249']
43+
Content-Range: [bytes */0]
44+
Content-Type: [application/xml]
45+
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
46+
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
47+
Vary: [Origin]
48+
x-ms-request-id: [07a0e5e6-0001-00d4-0c01-fd1df4000000]
49+
x-ms-version: ['2017-04-17']
50+
status: {code: 416, message: The range specified is invalid for the current size
51+
of the resource.}
52+
- request:
53+
body: null
54+
headers:
55+
Connection: [keep-alive]
56+
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
57+
x-ms-client-request-id: [a95d1d0c-68f4-11e7-9810-b8e8564491f6]
58+
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
59+
x-ms-version: ['2017-04-17']
60+
method: GET
61+
uri: https://storagename.blob.core.windows.net/utcontainerb59f1281/blobb59f1281
62+
response:
63+
body: {string: ''}
64+
headers:
65+
Accept-Ranges: [bytes]
66+
Content-Length: ['0']
67+
Content-Type: [application/octet-stream]
68+
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
69+
ETag: ['"0x8D4CB188E0207CD"']
70+
Last-Modified: ['Sat, 15 Jul 2017 00:29:28 GMT']
71+
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
72+
Vary: [Origin]
73+
x-ms-blob-committed-block-count: ['0']
74+
x-ms-blob-type: [AppendBlob]
75+
x-ms-lease-state: [available]
76+
x-ms-lease-status: [unlocked]
77+
x-ms-request-id: [07a0e5fb-0001-00d4-1e01-fd1df4000000]
78+
x-ms-server-encrypted: ['true']
79+
x-ms-version: ['2017-04-17']
80+
status: {code: 200, message: OK}
81+
version: 1

tests/recordings/test_append_blob.test_append_blob_from_bytes.yaml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ interactions:
44
headers:
55
Connection: [keep-alive]
66
Content-Length: ['0']
7-
User-Agent: [Azure-Storage/0.35.0 (Python CPython 3.6.1; Darwin 16.6.0)]
7+
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
88
x-ms-blob-type: [AppendBlob]
9-
x-ms-client-request-id: [c09f8312-67fa-11e7-b81c-b8e8564491f6]
10-
x-ms-date: ['Thu, 13 Jul 2017 18:40:32 GMT']
9+
x-ms-client-request-id: [a991647e-68f4-11e7-bf92-b8e8564491f6]
10+
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
1111
x-ms-version: ['2017-04-17']
1212
method: PUT
1313
uri: https://storagename.blob.core.windows.net/utcontainer927f11f2/blob927f11f2
1414
response:
1515
body: {string: ''}
1616
headers:
17-
Date: ['Thu, 13 Jul 2017 18:40:32 GMT']
18-
ETag: ['"0x8D4CA1EA4B65523"']
19-
Last-Modified: ['Thu, 13 Jul 2017 18:40:32 GMT']
17+
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
18+
ETag: ['"0x8D4CB188E5C4656"']
19+
Last-Modified: ['Sat, 15 Jul 2017 00:29:29 GMT']
2020
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
2121
Transfer-Encoding: [chunked]
22-
x-ms-request-id: [44842355-0001-0127-6a07-fc88c8000000]
22+
x-ms-request-id: [db81f098-0001-0044-6101-fd88b8000000]
2323
x-ms-request-server-encrypted: ['true']
2424
x-ms-version: ['2017-04-17']
2525
status: {code: 201, message: Created}
@@ -28,34 +28,34 @@ interactions:
2828
headers:
2929
Connection: [keep-alive]
3030
Content-Length: ['26']
31-
User-Agent: [Azure-Storage/0.35.0 (Python CPython 3.6.1; Darwin 16.6.0)]
32-
x-ms-client-request-id: [c0b42358-67fa-11e7-8376-b8e8564491f6]
33-
x-ms-date: ['Thu, 13 Jul 2017 18:40:33 GMT']
31+
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
32+
x-ms-client-request-id: [a9a668c6-68f4-11e7-b801-b8e8564491f6]
33+
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
3434
x-ms-version: ['2017-04-17']
3535
method: PUT
3636
uri: https://storagename.blob.core.windows.net/utcontainer927f11f2/blob927f11f2?comp=appendblock
3737
response:
3838
body: {string: ''}
3939
headers:
4040
Content-MD5: [w/zT12GS5AB9+0lsymfhOw==]
41-
Date: ['Thu, 13 Jul 2017 18:40:32 GMT']
42-
ETag: ['"0x8D4CA1EA4BCBEF0"']
43-
Last-Modified: ['Thu, 13 Jul 2017 18:40:32 GMT']
41+
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
42+
ETag: ['"0x8D4CB188E6213CB"']
43+
Last-Modified: ['Sat, 15 Jul 2017 00:29:29 GMT']
4444
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
4545
Transfer-Encoding: [chunked]
4646
x-ms-blob-append-offset: ['0']
4747
x-ms-blob-committed-block-count: ['1']
48-
x-ms-request-id: [44842362-0001-0127-7207-fc88c8000000]
48+
x-ms-request-id: [db81f0a7-0001-0044-6c01-fd88b8000000]
4949
x-ms-request-server-encrypted: ['true']
5050
x-ms-version: ['2017-04-17']
5151
status: {code: 201, message: Created}
5252
- request:
5353
body: null
5454
headers:
5555
Connection: [keep-alive]
56-
User-Agent: [Azure-Storage/0.35.0 (Python CPython 3.6.1; Darwin 16.6.0)]
57-
x-ms-client-request-id: [c0ba447a-67fa-11e7-9e11-b8e8564491f6]
58-
x-ms-date: ['Thu, 13 Jul 2017 18:40:33 GMT']
56+
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
57+
x-ms-client-request-id: [a9ac7fca-68f4-11e7-868c-b8e8564491f6]
58+
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
5959
x-ms-version: ['2017-04-17']
6060
method: HEAD
6161
uri: https://storagename.blob.core.windows.net/utcontainer927f11f2/blob927f11f2
@@ -65,26 +65,26 @@ interactions:
6565
Accept-Ranges: [bytes]
6666
Content-Length: ['26']
6767
Content-Type: [application/octet-stream]
68-
Date: ['Thu, 13 Jul 2017 18:40:32 GMT']
69-
ETag: ['"0x8D4CA1EA4BCBEF0"']
70-
Last-Modified: ['Thu, 13 Jul 2017 18:40:32 GMT']
68+
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
69+
ETag: ['"0x8D4CB188E6213CB"']
70+
Last-Modified: ['Sat, 15 Jul 2017 00:29:29 GMT']
7171
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
7272
Vary: [Origin]
7373
x-ms-blob-committed-block-count: ['1']
7474
x-ms-blob-type: [AppendBlob]
7575
x-ms-lease-state: [available]
7676
x-ms-lease-status: [unlocked]
77-
x-ms-request-id: [4484236a-0001-0127-7807-fc88c8000000]
77+
x-ms-request-id: [db81f0b4-0001-0044-7801-fd88b8000000]
7878
x-ms-server-encrypted: ['true']
7979
x-ms-version: ['2017-04-17']
8080
status: {code: 200, message: OK}
8181
- request:
8282
body: null
8383
headers:
8484
Connection: [keep-alive]
85-
User-Agent: [Azure-Storage/0.35.0 (Python CPython 3.6.1; Darwin 16.6.0)]
86-
x-ms-client-request-id: [c0bfec06-67fa-11e7-a825-b8e8564491f6]
87-
x-ms-date: ['Thu, 13 Jul 2017 18:40:33 GMT']
85+
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
86+
x-ms-client-request-id: [a9b42e9e-68f4-11e7-9805-b8e8564491f6]
87+
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
8888
x-ms-range: [bytes=0-33554431]
8989
x-ms-version: ['2017-04-17']
9090
method: GET
@@ -96,16 +96,16 @@ interactions:
9696
Content-Length: ['26']
9797
Content-Range: [bytes 0-25/26]
9898
Content-Type: [application/octet-stream]
99-
Date: ['Thu, 13 Jul 2017 18:40:32 GMT']
100-
ETag: ['"0x8D4CA1EA4BCBEF0"']
101-
Last-Modified: ['Thu, 13 Jul 2017 18:40:32 GMT']
99+
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
100+
ETag: ['"0x8D4CB188E6213CB"']
101+
Last-Modified: ['Sat, 15 Jul 2017 00:29:29 GMT']
102102
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
103103
Vary: [Origin]
104104
x-ms-blob-committed-block-count: ['1']
105105
x-ms-blob-type: [AppendBlob]
106106
x-ms-lease-state: [available]
107107
x-ms-lease-status: [unlocked]
108-
x-ms-request-id: [44842370-0001-0127-7d07-fc88c8000000]
108+
x-ms-request-id: [db81f0be-0001-0044-0201-fd88b8000000]
109109
x-ms-server-encrypted: ['true']
110110
x-ms-version: ['2017-04-17']
111111
status: {code: 206, message: Partial Content}

0 commit comments

Comments
 (0)