Skip to content

Commit 2be7f62

Browse files
[Storage] STG 98 Soft GA Prep (#41872)
1 parent 59465b4 commit 2be7f62

File tree

143 files changed

+6540
-5830
lines changed

Some content is hidden

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

143 files changed

+6540
-5830
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
### Features Added
66
- Stable release of features from 12.26.0b1
77

8+
### Bugs Fixed
9+
- Fixed an issue where `BlobClient`'s `start_copy_from_url` with `incremental_copy=True` results in `TypeError`.
10+
811
## 12.26.0b1 (2025-05-06)
912

1013
### Features Added

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def upload_blob_to_url(
122122
entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
123123
:keyword str encoding:
124124
Encoding to use if text is supplied as input. Defaults to UTF-8.
125-
:returns: Blob-updated property dict (Etag and last modified)
125+
:return: Blob-updated property dict (Etag and last modified)
126126
:rtype: dict(str, Any)
127127
"""
128128
with BlobClient.from_blob_url(blob_url, credential=credential) as client:
@@ -153,7 +153,7 @@ def download_blob_from_url(
153153
:param output:
154154
Where the data should be downloaded to. This could be either a file path to write to,
155155
or an open IO handle to write to.
156-
:type output: str or writable stream.
156+
:type output: str or IO.
157157
:param credential:
158158
The credentials with which to authenticate. This is optional if the
159159
blob URL already has a SAS token or the blob is public. The value can be a SAS token string,
@@ -190,6 +190,7 @@ def download_blob_from_url(
190190
blob. Also note that if enabled, the memory-efficient upload algorithm
191191
will not be used, because computing the MD5 hash requires buffering
192192
entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
193+
:return: None
193194
:rtype: None
194195
"""
195196
overwrite = kwargs.pop('overwrite', False)

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

Lines changed: 43 additions & 38 deletions
Large diffs are not rendered by default.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def _download_blob_options(
270270
The string representing the SDK package version.
271271
:param AzureBlobStorage client:
272272
The generated Blob Storage client.
273-
:returns: A dictionary containing the download blob options.
273+
:return: A dictionary containing the download blob options.
274274
:rtype: Dict[str, Any]
275275
"""
276276
if length is not None:
@@ -658,19 +658,20 @@ def _start_copy_from_url_options( # pylint:disable=too-many-statements
658658

659659
options = {
660660
'copy_source': source_url,
661-
'seal_blob': kwargs.pop('seal_destination_blob', None),
662661
'timeout': timeout,
663662
'modified_access_conditions': dest_mod_conditions,
664-
'blob_tags_string': blob_tags_string,
665663
'headers': headers,
666664
'cls': return_response_headers,
667665
}
666+
668667
if not incremental_copy:
669668
source_mod_conditions = get_source_conditions(kwargs)
670669
dest_access_conditions = get_access_conditions(kwargs.pop('destination_lease', None))
671670
options['source_modified_access_conditions'] = source_mod_conditions
672671
options['lease_access_conditions'] = dest_access_conditions
673672
options['tier'] = tier.value if tier else None
673+
options['seal_blob'] = kwargs.pop('seal_destination_blob', None)
674+
options['blob_tags_string'] = blob_tags_string
674675
options.update(kwargs)
675676
return options
676677

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

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _format_url(self, hostname):
137137
138138
:param str hostname:
139139
The hostname of the current location mode.
140-
:returns: A formatted endpoint URL including current location mode hostname.
140+
:return: A formatted endpoint URL including current location mode hostname.
141141
:rtype: str
142142
"""
143143
return f"{self.scheme}://{hostname}/{self._query_str}"
@@ -169,7 +169,7 @@ def from_connection_string(
169169
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
170170
authentication. Only has an effect when credential is of type TokenCredential. The value could be
171171
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
172-
:returns: A Blob service client.
172+
:return: A Blob service client.
173173
:rtype: ~azure.storage.blob.BlobServiceClient
174174
175175
.. admonition:: Example:
@@ -206,7 +206,7 @@ def get_user_delegation_key(
206206
This value is not tracked or validated on the client. To configure client-side network timesouts
207207
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
208208
#other-client--per-operation-configuration>`__.
209-
:returns: The user delegation key.
209+
:return: The user delegation key.
210210
:rtype: ~azure.storage.blob.UserDelegationKey
211211
"""
212212
key_info = KeyInfo(start=_to_utc_datetime(key_start_time), expiry=_to_utc_datetime(key_expiry_time))
@@ -227,7 +227,7 @@ def get_account_information(self, **kwargs: Any) -> Dict[str, str]:
227227
The information can also be retrieved if the user has a SAS to a container or blob.
228228
The keys in the returned dictionary include 'sku_name' and 'account_kind'.
229229
230-
:returns: A dict of account information (SKU and account type).
230+
:return: A dict of account information (SKU and account type).
231231
:rtype: dict(str, str)
232232
233233
.. admonition:: Example:
@@ -270,7 +270,7 @@ def get_service_stats(self, **kwargs: Any) -> Dict[str, Any]:
270270
This value is not tracked or validated on the client. To configure client-side network timesouts
271271
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
272272
#other-client--per-operation-configuration>`__.
273-
:returns: The blob service stats.
273+
:return: The blob service stats.
274274
:rtype: Dict[str, Any]
275275
276276
.. admonition:: Example:
@@ -301,7 +301,7 @@ def get_service_properties(self, **kwargs: Any) -> Dict[str, Any]:
301301
This value is not tracked or validated on the client. To configure client-side network timesouts
302302
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
303303
#other-client--per-operation-configuration>`__.
304-
:returns: An object containing blob service properties such as
304+
:return: An object containing blob service properties such as
305305
analytics logging, hour/minute metrics, cors rules, etc.
306306
:rtype: Dict[str, Any]
307307
@@ -371,6 +371,7 @@ def set_service_properties(
371371
This value is not tracked or validated on the client. To configure client-side network timesouts
372372
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
373373
#other-client--per-operation-configuration>`__.
374+
:return: None
374375
:rtype: None
375376
376377
.. admonition:: Example:
@@ -435,7 +436,7 @@ def list_containers(
435436
This value is not tracked or validated on the client. To configure client-side network timesouts
436437
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
437438
#other-client--per-operation-configuration>`__.
438-
:returns: An iterable (auto-paging) of ContainerProperties.
439+
:return: An iterable (auto-paging) of ContainerProperties.
439440
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.ContainerProperties]
440441
441442
.. admonition:: Example:
@@ -489,7 +490,7 @@ def find_blobs_by_tags(self, filter_expression: str, **kwargs: Any) -> ItemPaged
489490
This value is not tracked or validated on the client. To configure client-side network timesouts
490491
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
491492
#other-client--per-operation-configuration>`__.
492-
:returns: An iterable (auto-paging) response of BlobProperties.
493+
:return: An iterable (auto-paging) response of BlobProperties.
493494
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.FilteredBlob]
494495
"""
495496

@@ -538,7 +539,7 @@ def create_container(
538539
This value is not tracked or validated on the client. To configure client-side network timesouts
539540
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
540541
#other-client--per-operation-configuration>`__.
541-
:returns: A container client to interact with the newly created container.
542+
:return: A container client to interact with the newly created container.
542543
:rtype: ~azure.storage.blob.ContainerClient
543544
544545
.. admonition:: Example:
@@ -600,6 +601,8 @@ def delete_container(
600601
This value is not tracked or validated on the client. To configure client-side network timesouts
601602
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
602603
#other-client--per-operation-configuration>`__.
604+
:return: None
605+
:rtype: None
603606
604607
.. admonition:: Example:
605608
@@ -638,7 +641,7 @@ def _rename_container(self, name: str, new_name: str, **kwargs: Any) -> Containe
638641
This value is not tracked or validated on the client. To configure client-side network timesouts
639642
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
640643
#other-client--per-operation-configuration>`__.
641-
:returns: A container client for the renamed container.
644+
:return: A container client for the renamed container.
642645
:rtype: ~azure.storage.blob.ContainerClient
643646
"""
644647
renamed_container = self.get_container_client(new_name)
@@ -677,7 +680,7 @@ def undelete_container(
677680
This value is not tracked or validated on the client. To configure client-side network timesouts
678681
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
679682
#other-client--per-operation-configuration>`__.
680-
:returns: The undeleted ContainerClient.
683+
:return: The undeleted ContainerClient.
681684
:rtype: ~azure.storage.blob.ContainerClient
682685
"""
683686
new_name = kwargs.pop('new_name', None)
@@ -701,7 +704,7 @@ def get_container_client(self, container: Union[ContainerProperties, str]) -> Co
701704
The container. This can either be the name of the container,
702705
or an instance of ContainerProperties.
703706
:type container: str or ~azure.storage.blob.ContainerProperties
704-
:returns: A ContainerClient.
707+
:return: A ContainerClient.
705708
:rtype: ~azure.storage.blob.ContainerClient
706709
707710
.. admonition:: Example:
@@ -750,7 +753,7 @@ def get_blob_client(
750753
:type snapshot: str or dict(str, Any)
751754
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
752755
specifies the version of the blob to operate on.
753-
:returns: A BlobClient.
756+
:return: A BlobClient.
754757
:rtype: ~azure.storage.blob.BlobClient
755758
756759
.. admonition:: Example:

0 commit comments

Comments
 (0)