Skip to content

Commit cbfacbd

Browse files
authored
[Storage]Unify service version and update changelog (Azure#20723)
* [Storage]Unify service version and update changelog * fix test
1 parent ea5ecea commit cbfacbd

Some content is hidden

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

45 files changed

+203
-55
lines changed

sdk/storage/azure-storage-blob/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 12.9.0 (2021-09-15)
4+
**Stable release of preview features**
5+
- Added support for service version 2020-10-02 (STG78)
6+
- Added support for object level immutability policy with versioning (Version Level WORM).
7+
- Added support for listing deleted root blobs that have versions.
8+
- Added OAuth support for sync copy blob source.
9+
310
## 12.9.0b1 (2021-07-27)
411
**New Features**
512
- Added support for object level immutability policy with versioning (Version Level WORM).

sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ def __init__(
176176
self._query_str, credential = self._format_query_string(sas_token, credential, snapshot=self.snapshot)
177177
super(BlobClient, self).__init__(parsed_url, service='blob', credential=credential, **kwargs)
178178
self._client = AzureBlobStorage(self.url, pipeline=self._pipeline)
179-
default_api_version = self._client._config.version # pylint: disable=protected-access
180-
self._client._config.version = get_api_version(kwargs, default_api_version) # pylint: disable=protected-access
179+
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
181180

182181
def _format_url(self, hostname):
183182
container_name = self.container_name

sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ def __init__(
134134
self._query_str, credential = self._format_query_string(sas_token, credential)
135135
super(BlobServiceClient, self).__init__(parsed_url, service='blob', credential=credential, **kwargs)
136136
self._client = AzureBlobStorage(self.url, pipeline=self._pipeline)
137-
default_api_version = self._client._config.version # pylint: disable=protected-access
138-
self._client._config.version = get_api_version(kwargs, default_api_version) # pylint: disable=protected-access
137+
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
139138

140139
def _format_url(self, hostname):
141140
"""Format the endpoint URL according to the current location

sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ def __init__(
156156
self._query_str, credential = self._format_query_string(sas_token, credential)
157157
super(ContainerClient, self).__init__(parsed_url, service='blob', credential=credential, **kwargs)
158158
self._client = AzureBlobStorage(self.url, pipeline=self._pipeline)
159-
default_api_version = self._client._config.version # pylint: disable=protected-access
160-
self._client._config.version = get_api_version(kwargs, default_api_version) # pylint: disable=protected-access
159+
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
161160

162161
def _format_url(self, hostname):
163162
container_name = self.container_name

sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ def get_container_cpk_scope_info(kwargs):
126126
return None
127127

128128

129-
def get_api_version(kwargs, default):
129+
def get_api_version(kwargs):
130130
# type: (Dict[str, Any], str) -> str
131-
api_version = kwargs.pop('api_version', None)
131+
api_version = kwargs.get('api_version', None)
132132
if api_version and api_version not in _SUPPORTED_API_VERSIONS:
133133
versions = '\n'.join(_SUPPORTED_API_VERSIONS)
134134
raise ValueError("Unsupported API version '{}'. Please select from:\n{}".format(api_version, versions))
135-
return api_version or default
135+
return api_version or _SUPPORTED_API_VERSIONS[-1]
136136

137137

138138
def serialize_blob_tags_header(tags=None):

sdk/storage/azure-storage-blob/azure/storage/blob/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# license information.
55
# --------------------------------------------------------------------------
66

7-
VERSION = "12.9.0b1"
7+
VERSION = "12.9.0"

sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ def __init__(
120120
credential=credential,
121121
**kwargs)
122122
self._client = AzureBlobStorage(url=self.url, pipeline=self._pipeline)
123-
default_api_version = self._client._config.version # pylint: disable=protected-access
124-
self._client._config.version = get_api_version(kwargs, default_api_version) # pylint: disable=protected-access
123+
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
125124

126125
@distributed_trace_async
127126
async def get_account_information(self, **kwargs): # type: ignore

sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_service_client_async.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ def __init__(
118118
credential=credential,
119119
**kwargs)
120120
self._client = AzureBlobStorage(url=self.url, pipeline=self._pipeline)
121-
default_api_version = self._client._config.version # pylint: disable=protected-access
122-
self._client._config.version = get_api_version(kwargs, default_api_version) # pylint: disable=protected-access
121+
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
123122

124123
@distributed_trace_async
125124
async def get_user_delegation_key(self, key_start_time, # type: datetime

sdk/storage/azure-storage-blob/azure/storage/blob/aio/_container_client_async.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ def __init__(
117117
credential=credential,
118118
**kwargs)
119119
self._client = AzureBlobStorage(url=self.url, pipeline=self._pipeline)
120-
default_api_version = self._client._config.version # pylint: disable=protected-access
121-
self._client._config.version = get_api_version(kwargs, default_api_version) # pylint: disable=protected-access
120+
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
122121

123122
@distributed_trace_async
124123
async def create_container(self, metadata=None, public_access=None, **kwargs):

sdk/storage/azure-storage-blob/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
author_email='ascl@microsoft.com',
7373
url='https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob',
7474
classifiers=[
75-
'Development Status :: 4 - Beta',
75+
"Development Status :: 5 - Production/Stable",
7676
'Programming Language :: Python',
7777
'Programming Language :: Python :: 2',
7878
'Programming Language :: Python :: 2.7',

0 commit comments

Comments
 (0)