Skip to content

Commit 874cfcf

Browse files
[Storage] Update Swagger and Release Date (#44243)
1 parent cb4c2df commit 874cfcf

File tree

52 files changed

+1531
-540
lines changed

Some content is hidden

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

52 files changed

+1531
-540
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 12.28.0b1 (2025-12-03)
3+
## 12.28.0b1 (2025-12-04)
44

55
### Features Added
66
- Added support for service version 2026-02-06.

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_5a54b5cd9f"
5+
"Tag": "python/storage/azure-storage-blob_80e628b209"
66
}

sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_utils/serialization.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import sys
2222
import codecs
2323
from typing import (
24-
Dict,
2524
Any,
2625
cast,
2726
Optional,
@@ -31,7 +30,6 @@
3130
Mapping,
3231
Callable,
3332
MutableMapping,
34-
List,
3533
)
3634

3735
try:
@@ -229,12 +227,12 @@ class Model:
229227
serialization and deserialization.
230228
"""
231229

232-
_subtype_map: Dict[str, Dict[str, Any]] = {}
233-
_attribute_map: Dict[str, Dict[str, Any]] = {}
234-
_validation: Dict[str, Dict[str, Any]] = {}
230+
_subtype_map: dict[str, dict[str, Any]] = {}
231+
_attribute_map: dict[str, dict[str, Any]] = {}
232+
_validation: dict[str, dict[str, Any]] = {}
235233

236234
def __init__(self, **kwargs: Any) -> None:
237-
self.additional_properties: Optional[Dict[str, Any]] = {}
235+
self.additional_properties: Optional[dict[str, Any]] = {}
238236
for k in kwargs: # pylint: disable=consider-using-dict-items
239237
if k not in self._attribute_map:
240238
_LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__)
@@ -311,7 +309,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON:
311309
def as_dict(
312310
self,
313311
keep_readonly: bool = True,
314-
key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer,
312+
key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer,
315313
**kwargs: Any
316314
) -> JSON:
317315
"""Return a dict that can be serialized using json.dump.
@@ -380,7 +378,7 @@ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self:
380378
def from_dict(
381379
cls,
382380
data: Any,
383-
key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None,
381+
key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None,
384382
content_type: Optional[str] = None,
385383
) -> Self:
386384
"""Parse a dict using given key extractor return a model.
@@ -414,7 +412,7 @@ def _flatten_subtype(cls, key, objects):
414412
return {}
415413
result = dict(cls._subtype_map[key])
416414
for valuetype in cls._subtype_map[key].values():
417-
result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access
415+
result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access
418416
return result
419417

420418
@classmethod
@@ -528,7 +526,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
528526
"[]": self.serialize_iter,
529527
"{}": self.serialize_dict,
530528
}
531-
self.dependencies: Dict[str, type] = dict(classes) if classes else {}
529+
self.dependencies: dict[str, type] = dict(classes) if classes else {}
532530
self.key_transformer = full_restapi_key_transformer
533531
self.client_side_validation = True
534532

@@ -579,7 +577,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to
579577

580578
if attr_name == "additional_properties" and attr_desc["key"] == "":
581579
if target_obj.additional_properties is not None:
582-
serialized.update(target_obj.additional_properties)
580+
serialized |= target_obj.additional_properties
583581
continue
584582
try:
585583

@@ -789,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs):
789787

790788
# If dependencies is empty, try with current data class
791789
# It has to be a subclass of Enum anyway
792-
enum_type = self.dependencies.get(data_type, data.__class__)
790+
enum_type = self.dependencies.get(data_type, cast(type, data.__class__))
793791
if issubclass(enum_type, Enum):
794792
return Serializer.serialize_enum(data, enum_obj=enum_type)
795793

@@ -1184,7 +1182,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen
11841182

11851183
while "." in key:
11861184
# Need the cast, as for some reasons "split" is typed as list[str | Any]
1187-
dict_keys = cast(List[str], _FLATTEN.split(key))
1185+
dict_keys = cast(list[str], _FLATTEN.split(key))
11881186
if len(dict_keys) == 1:
11891187
key = _decode_attribute_map_key(dict_keys[0])
11901188
break
@@ -1386,7 +1384,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
13861384
"duration": (isodate.Duration, datetime.timedelta),
13871385
"iso-8601": (datetime.datetime),
13881386
}
1389-
self.dependencies: Dict[str, type] = dict(classes) if classes else {}
1387+
self.dependencies: dict[str, type] = dict(classes) if classes else {}
13901388
self.key_extractors = [rest_key_extractor, xml_key_extractor]
13911389
# Additional properties only works if the "rest_key_extractor" is used to
13921390
# extract the keys. Making it to work whatever the key extractor is too much

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

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# --------------------------------------------------------------------------
99
from collections.abc import MutableMapping
1010
import datetime
11-
from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
11+
from typing import Any, Callable, IO, Literal, Optional, TypeVar, Union
1212

1313
from azure.core import AsyncPipelineClient
1414
from azure.core.exceptions import (
@@ -35,7 +35,7 @@
3535
from .._configuration import AzureBlobStorageConfiguration
3636

3737
T = TypeVar("T")
38-
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
38+
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
3939

4040

4141
class AppendBlobOperations:
@@ -62,7 +62,7 @@ async def create(
6262
self,
6363
content_length: int,
6464
timeout: Optional[int] = None,
65-
metadata: Optional[Dict[str, str]] = None,
65+
metadata: Optional[dict[str, str]] = None,
6666
request_id_parameter: Optional[str] = None,
6767
blob_tags_string: Optional[str] = None,
6868
immutability_policy_expiry: Optional[datetime.datetime] = None,
@@ -215,7 +215,10 @@ async def create(
215215

216216
if response.status_code not in [201]:
217217
map_error(status_code=response.status_code, response=response, error_map=error_map)
218-
error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
218+
error = self._deserialize.failsafe_deserialize(
219+
_models.StorageError,
220+
pipeline_response,
221+
)
219222
raise HttpResponseError(response=response, model=error)
220223

221224
response_headers = {}
@@ -390,7 +393,10 @@ async def append_block(
390393

391394
if response.status_code not in [201]:
392395
map_error(status_code=response.status_code, response=response, error_map=error_map)
393-
error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
396+
error = self._deserialize.failsafe_deserialize(
397+
_models.StorageError,
398+
pipeline_response,
399+
)
394400
raise HttpResponseError(response=response, model=error)
395401

396402
response_headers = {}
@@ -598,7 +604,10 @@ async def append_block_from_url(
598604

599605
if response.status_code not in [201]:
600606
map_error(status_code=response.status_code, response=response, error_map=error_map)
601-
error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
607+
error = self._deserialize.failsafe_deserialize(
608+
_models.StorageError,
609+
pipeline_response,
610+
)
602611
raise HttpResponseError(response=response, model=error)
603612

604613
response_headers = {}
@@ -719,7 +728,10 @@ async def seal(
719728

720729
if response.status_code not in [200]:
721730
map_error(status_code=response.status_code, response=response, error_map=error_map)
722-
error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
731+
error = self._deserialize.failsafe_deserialize(
732+
_models.StorageError,
733+
pipeline_response,
734+
)
723735
raise HttpResponseError(response=response, model=error)
724736

725737
response_headers = {}

0 commit comments

Comments
 (0)