Skip to content

Commit 215bb40

Browse files
[Storage] [STG 94] Merge STG 94 into main branch (#35888)
1 parent bf4ee7f commit 215bb40

File tree

115 files changed

+1561
-581
lines changed

Some content is hidden

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

115 files changed

+1561
-581
lines changed

sdk/storage/azure-storage-blob/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/storage/azure-storage-blob",
5-
"Tag": "python/storage/azure-storage-blob_c4f327d388"
5+
"Tag": "python/storage/azure-storage-blob_275000b78a"
66
}

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_azure_blob_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
4747
:param base_url: Service URL. Required. Default value is "".
4848
:type base_url: str
4949
:keyword version: Specifies the version of the operation to use for this request. Default value
50-
is "2021-12-02". Note that overriding this default value may result in unsupported behavior.
50+
is "2024-08-04". Note that overriding this default value may result in unsupported behavior.
5151
:paramtype version: str
5252
"""
5353

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ class AzureBlobStorageConfiguration: # pylint: disable=too-many-instance-attrib
2323
desired operation. Required.
2424
:type url: str
2525
:keyword version: Specifies the version of the operation to use for this request. Default value
26-
is "2021-12-02". Note that overriding this default value may result in unsupported behavior.
26+
is "2024-08-04". Note that overriding this default value may result in unsupported behavior.
2727
:paramtype version: str
2828
"""
2929

3030
def __init__(self, url: str, **kwargs: Any) -> None:
31-
version: Literal["2021-12-02"] = kwargs.pop("version", "2021-12-02")
31+
version: Literal["2024-08-04"] = kwargs.pop("version", "2024-08-04")
3232

3333
if url is None:
3434
raise ValueError("Parameter 'url' must not be None.")

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_patch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@
2727

2828
# This file is used for handwritten extensions to the generated code. Example:
2929
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
30+
31+
3032
def patch_sdk():
3133
pass

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ def _deserialize(self, target_obj, data):
14411441
elif isinstance(response, type) and issubclass(response, Enum):
14421442
return self.deserialize_enum(data, response)
14431443

1444-
if data is None:
1444+
if data is None or data is CoreNull:
14451445
return data
14461446
try:
14471447
attributes = response._attribute_map # type: ignore

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/_azure_blob_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
4747
:param base_url: Service URL. Required. Default value is "".
4848
:type base_url: str
4949
:keyword version: Specifies the version of the operation to use for this request. Default value
50-
is "2021-12-02". Note that overriding this default value may result in unsupported behavior.
50+
is "2024-08-04". Note that overriding this default value may result in unsupported behavior.
5151
:paramtype version: str
5252
"""
5353

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ class AzureBlobStorageConfiguration: # pylint: disable=too-many-instance-attrib
2323
desired operation. Required.
2424
:type url: str
2525
:keyword version: Specifies the version of the operation to use for this request. Default value
26-
is "2021-12-02". Note that overriding this default value may result in unsupported behavior.
26+
is "2024-08-04". Note that overriding this default value may result in unsupported behavior.
2727
:paramtype version: str
2828
"""
2929

3030
def __init__(self, url: str, **kwargs: Any) -> None:
31-
version: Literal["2021-12-02"] = kwargs.pop("version", "2021-12-02")
31+
version: Literal["2024-08-04"] = kwargs.pop("version", "2024-08-04")
3232

3333
if url is None:
3434
raise ValueError("Parameter 'url' must not be None.")

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/_patch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@
2727

2828
# This file is used for handwritten extensions to the generated code. Example:
2929
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
30+
31+
3032
def patch_sdk():
3133
pass

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_append_blob_operations.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
99
import datetime
10-
from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
10+
import sys
11+
from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union
1112

1213
from azure.core.exceptions import (
1314
ClientAuthenticationError,
@@ -32,6 +33,10 @@
3233
build_seal_request,
3334
)
3435

36+
if sys.version_info >= (3, 9):
37+
from collections.abc import MutableMapping
38+
else:
39+
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
3540
T = TypeVar("T")
3641
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
3742

@@ -119,7 +124,7 @@ async def create( # pylint: disable=inconsistent-return-statements
119124
:rtype: None
120125
:raises ~azure.core.exceptions.HttpResponseError:
121126
"""
122-
error_map = {
127+
error_map: MutableMapping[int, Type[HttpResponseError]] = {
123128
401: ClientAuthenticationError,
124129
404: ResourceNotFoundError,
125130
409: ResourceExistsError,
@@ -295,7 +300,7 @@ async def append_block( # pylint: disable=inconsistent-return-statements
295300
:rtype: None
296301
:raises ~azure.core.exceptions.HttpResponseError:
297302
"""
298-
error_map = {
303+
error_map: MutableMapping[int, Type[HttpResponseError]] = {
299304
401: ClientAuthenticationError,
300305
404: ResourceNotFoundError,
301306
409: ResourceExistsError,
@@ -484,7 +489,7 @@ async def append_block_from_url( # pylint: disable=inconsistent-return-statemen
484489
:rtype: None
485490
:raises ~azure.core.exceptions.HttpResponseError:
486491
"""
487-
error_map = {
492+
error_map: MutableMapping[int, Type[HttpResponseError]] = {
488493
401: ClientAuthenticationError,
489494
404: ResourceNotFoundError,
490495
409: ResourceExistsError,
@@ -646,7 +651,7 @@ async def seal( # pylint: disable=inconsistent-return-statements
646651
:rtype: None
647652
:raises ~azure.core.exceptions.HttpResponseError:
648653
"""
649-
error_map = {
654+
error_map: MutableMapping[int, Type[HttpResponseError]] = {
650655
401: ClientAuthenticationError,
651656
404: ResourceNotFoundError,
652657
409: ResourceExistsError,

0 commit comments

Comments
 (0)