Skip to content

Commit

Permalink
Merge pull request #328 from zezha-msft/hotfix-0.35.1
Browse files Browse the repository at this point in the history
Hotfix 0.35.1
  • Loading branch information
zezha-msft authored Jul 15, 2017
2 parents 127cf6a + 03415fa commit 2674a2c
Show file tree
Hide file tree
Showing 623 changed files with 22,078 additions and 21,928 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

> See [BreakingChanges](BreakingChanges.md) for a detailed list of API breaks.
## Version 0.35.1:

### Blob:
- Fixed bug where calling create_from_* and and append_blob_from_* methods with no data fails.

## Version 0.35.0:

### All:
Expand Down
2 changes: 1 addition & 1 deletion azure/storage/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import platform

__author__ = 'Microsoft Corp. <ptvshelp@microsoft.com>'
__version__ = '0.35.0'
__version__ = '0.35.1'

# x-ms-version for storage service.
X_MS_VERSION = '2017-04-17'
Expand Down
2 changes: 2 additions & 0 deletions azure/storage/blob/_upload_chunking.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ def __init__(self, blob_service, container_name, blob_name, blob_size,
self.timeout = timeout
self.encryptor = encryptor
self.padder = padder
self.last_modified = None
self.etag = None

def get_chunk_streams(self):
index = 0
Expand Down
2 changes: 1 addition & 1 deletion azure/storage/blob/blockblobservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def create_blob_from_stream(
if (self.key_encryption_key is not None) and (adjusted_count is not None):
adjusted_count += (16 - (count % 16))

if adjusted_count and adjusted_count < self.MAX_SINGLE_PUT_SIZE:
if adjusted_count is not None and (adjusted_count < self.MAX_SINGLE_PUT_SIZE):
if progress_callback:
progress_callback(0, count)

Expand Down
3 changes: 3 additions & 0 deletions azure/storage/blob/pageblobservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,9 @@ def create_blob_from_stream(
encryption_data=encryption_data
)

if count == 0:
return response

# _upload_blob_chunks returns the block ids for block blobs so resource_properties
# is passed as a parameter to get the last_modified and etag for page and append blobs.
# this info is not needed for block_blobs since _put_block_list is called after which gets this info
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
# built documents.
#
# The short X.Y version.
version = '0.35.0'
version = '0.35.1'
# The full version, including alpha/beta/rc tags.
release = '0.35.0'
release = '0.35.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

setup(
name='azure-storage',
version='0.35.0',
version='0.35.1',
description='Microsoft Azure Storage Client Library for Python',
long_description=open('README.rst', 'r').read(),
license='Apache License 2.0',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
interactions:
- request:
body: null
headers:
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-blob-type: [AppendBlob]
x-ms-client-request-id: [a93746cc-68f4-11e7-84ba-b8e8564491f6]
x-ms-date: ['Sat, 15 Jul 2017 00:29:27 GMT']
x-ms-version: ['2017-04-17']
method: PUT
uri: https://storagename.blob.core.windows.net/utcontainerb59f1281/blobb59f1281
response:
body: {string: ''}
headers:
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
ETag: ['"0x8D4CB188E0207CD"']
Last-Modified: ['Sat, 15 Jul 2017 00:29:28 GMT']
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [07a0e5c6-0001-00d4-7101-fd1df4000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2017-04-17']
status: {code: 201, message: Created}
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-client-request-id: [a9572110-68f4-11e7-b84e-b8e8564491f6]
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
x-ms-range: [bytes=0-33554431]
x-ms-version: ['2017-04-17']
method: GET
uri: https://storagename.blob.core.windows.net/utcontainerb59f1281/blobb59f1281
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>InvalidRange</Code><Message>The\
\ range specified is invalid for the current size of the resource.\nRequestId:07a0e5e6-0001-00d4-0c01-fd1df4000000\n\
Time:2017-07-15T00:29:28.7981699Z</Message></Error>"}
headers:
Content-Length: ['249']
Content-Range: [bytes */0]
Content-Type: [application/xml]
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
Vary: [Origin]
x-ms-request-id: [07a0e5e6-0001-00d4-0c01-fd1df4000000]
x-ms-version: ['2017-04-17']
status: {code: 416, message: The range specified is invalid for the current size
of the resource.}
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-client-request-id: [a95d1d0c-68f4-11e7-9810-b8e8564491f6]
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
x-ms-version: ['2017-04-17']
method: GET
uri: https://storagename.blob.core.windows.net/utcontainerb59f1281/blobb59f1281
response:
body: {string: ''}
headers:
Accept-Ranges: [bytes]
Content-Length: ['0']
Content-Type: [application/octet-stream]
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
ETag: ['"0x8D4CB188E0207CD"']
Last-Modified: ['Sat, 15 Jul 2017 00:29:28 GMT']
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
Vary: [Origin]
x-ms-blob-committed-block-count: ['0']
x-ms-blob-type: [AppendBlob]
x-ms-lease-state: [available]
x-ms-lease-status: [unlocked]
x-ms-request-id: [07a0e5fb-0001-00d4-1e01-fd1df4000000]
x-ms-server-encrypted: ['true']
x-ms-version: ['2017-04-17']
status: {code: 200, message: OK}
version: 1
56 changes: 28 additions & 28 deletions tests/recordings/test_append_blob.test_append_blob_from_bytes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ interactions:
headers:
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/0.35.0 (Python CPython 3.6.1; Darwin 16.6.0)]
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-blob-type: [AppendBlob]
x-ms-client-request-id: [c09f8312-67fa-11e7-b81c-b8e8564491f6]
x-ms-date: ['Thu, 13 Jul 2017 18:40:32 GMT']
x-ms-client-request-id: [a991647e-68f4-11e7-bf92-b8e8564491f6]
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
x-ms-version: ['2017-04-17']
method: PUT
uri: https://storagename.blob.core.windows.net/utcontainer927f11f2/blob927f11f2
response:
body: {string: ''}
headers:
Date: ['Thu, 13 Jul 2017 18:40:32 GMT']
ETag: ['"0x8D4CA1EA4B65523"']
Last-Modified: ['Thu, 13 Jul 2017 18:40:32 GMT']
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
ETag: ['"0x8D4CB188E5C4656"']
Last-Modified: ['Sat, 15 Jul 2017 00:29:29 GMT']
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [44842355-0001-0127-6a07-fc88c8000000]
x-ms-request-id: [db81f098-0001-0044-6101-fd88b8000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2017-04-17']
status: {code: 201, message: Created}
Expand All @@ -28,34 +28,34 @@ interactions:
headers:
Connection: [keep-alive]
Content-Length: ['26']
User-Agent: [Azure-Storage/0.35.0 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-client-request-id: [c0b42358-67fa-11e7-8376-b8e8564491f6]
x-ms-date: ['Thu, 13 Jul 2017 18:40:33 GMT']
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-client-request-id: [a9a668c6-68f4-11e7-b801-b8e8564491f6]
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
x-ms-version: ['2017-04-17']
method: PUT
uri: https://storagename.blob.core.windows.net/utcontainer927f11f2/blob927f11f2?comp=appendblock
response:
body: {string: ''}
headers:
Content-MD5: [w/zT12GS5AB9+0lsymfhOw==]
Date: ['Thu, 13 Jul 2017 18:40:32 GMT']
ETag: ['"0x8D4CA1EA4BCBEF0"']
Last-Modified: ['Thu, 13 Jul 2017 18:40:32 GMT']
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
ETag: ['"0x8D4CB188E6213CB"']
Last-Modified: ['Sat, 15 Jul 2017 00:29:29 GMT']
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-blob-append-offset: ['0']
x-ms-blob-committed-block-count: ['1']
x-ms-request-id: [44842362-0001-0127-7207-fc88c8000000]
x-ms-request-id: [db81f0a7-0001-0044-6c01-fd88b8000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2017-04-17']
status: {code: 201, message: Created}
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/0.35.0 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-client-request-id: [c0ba447a-67fa-11e7-9e11-b8e8564491f6]
x-ms-date: ['Thu, 13 Jul 2017 18:40:33 GMT']
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-client-request-id: [a9ac7fca-68f4-11e7-868c-b8e8564491f6]
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
x-ms-version: ['2017-04-17']
method: HEAD
uri: https://storagename.blob.core.windows.net/utcontainer927f11f2/blob927f11f2
Expand All @@ -65,26 +65,26 @@ interactions:
Accept-Ranges: [bytes]
Content-Length: ['26']
Content-Type: [application/octet-stream]
Date: ['Thu, 13 Jul 2017 18:40:32 GMT']
ETag: ['"0x8D4CA1EA4BCBEF0"']
Last-Modified: ['Thu, 13 Jul 2017 18:40:32 GMT']
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
ETag: ['"0x8D4CB188E6213CB"']
Last-Modified: ['Sat, 15 Jul 2017 00:29:29 GMT']
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
Vary: [Origin]
x-ms-blob-committed-block-count: ['1']
x-ms-blob-type: [AppendBlob]
x-ms-lease-state: [available]
x-ms-lease-status: [unlocked]
x-ms-request-id: [4484236a-0001-0127-7807-fc88c8000000]
x-ms-request-id: [db81f0b4-0001-0044-7801-fd88b8000000]
x-ms-server-encrypted: ['true']
x-ms-version: ['2017-04-17']
status: {code: 200, message: OK}
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/0.35.0 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-client-request-id: [c0bfec06-67fa-11e7-a825-b8e8564491f6]
x-ms-date: ['Thu, 13 Jul 2017 18:40:33 GMT']
User-Agent: [Azure-Storage/0.35.1 (Python CPython 3.6.1; Darwin 16.6.0)]
x-ms-client-request-id: [a9b42e9e-68f4-11e7-9805-b8e8564491f6]
x-ms-date: ['Sat, 15 Jul 2017 00:29:28 GMT']
x-ms-range: [bytes=0-33554431]
x-ms-version: ['2017-04-17']
method: GET
Expand All @@ -96,16 +96,16 @@ interactions:
Content-Length: ['26']
Content-Range: [bytes 0-25/26]
Content-Type: [application/octet-stream]
Date: ['Thu, 13 Jul 2017 18:40:32 GMT']
ETag: ['"0x8D4CA1EA4BCBEF0"']
Last-Modified: ['Thu, 13 Jul 2017 18:40:32 GMT']
Date: ['Sat, 15 Jul 2017 00:29:28 GMT']
ETag: ['"0x8D4CB188E6213CB"']
Last-Modified: ['Sat, 15 Jul 2017 00:29:29 GMT']
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
Vary: [Origin]
x-ms-blob-committed-block-count: ['1']
x-ms-blob-type: [AppendBlob]
x-ms-lease-state: [available]
x-ms-lease-status: [unlocked]
x-ms-request-id: [44842370-0001-0127-7d07-fc88c8000000]
x-ms-request-id: [db81f0be-0001-0044-0201-fd88b8000000]
x-ms-server-encrypted: ['true']
x-ms-version: ['2017-04-17']
status: {code: 206, message: Partial Content}
Expand Down
Loading

0 comments on commit 2674a2c

Please sign in to comment.