Skip to content

Commit 57c62ec

Browse files
[Storage] STG 99 GA Branch Prep (#42098)
1 parent 57f5413 commit 57c62ec

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

+495
-235
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 12.0.0b6 (Unreleased)
44

5+
This version and all future versions will require Python 3.9+. Python 3.8 is no longer supported.
6+
57
### Features Added
68

79

sdk/storage/azure-storage-blob-changefeed/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This preview package for Python enables users to get blob change feed events. Th
99
## Getting started
1010

1111
### Prerequisites
12-
* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).
12+
* Python 3.9 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).
1313
* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an
1414
[Azure storage account](https://learn.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account) to use this package.
1515

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
'Programming Language :: Python',
6161
"Programming Language :: Python :: 3 :: Only",
6262
'Programming Language :: Python :: 3',
63-
'Programming Language :: Python :: 3.8',
6463
'Programming Language :: Python :: 3.9',
6564
'Programming Language :: Python :: 3.10',
6665
'Programming Language :: Python :: 3.11',
@@ -75,7 +74,7 @@
7574
package_data={
7675
'pytyped': ['py.typed'],
7776
},
78-
python_requires=">=3.8",
77+
python_requires=">=3.9",
7978
install_requires=[
8079
"azure-storage-blob>=12.19.1,<13.0.0"
8180
],

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

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

3+
## 12.27.0 (Unreleased)
4+
5+
### Features Added
6+
- Stable release of features from 12.27.0b1
7+
8+
## 12.26.0 (2025-07-16)
9+
10+
### Features Added
11+
- Stable release of features from 12.26.0b1
12+
13+
### Bugs Fixed
14+
- Fixed an issue where `BlobClient`'s `start_copy_from_url` with `incremental_copy=True` results in `TypeError`.
15+
316
## 12.27.0b1 (2025-06-12)
417

518
This version and all future versions will require Python 3.9+. Python 3.8 is no longer supported.

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,22 @@ def __init__(
190190
self._client._config.version = get_api_version(kwargs) # type: ignore [assignment]
191191
self._configure_encryption(kwargs)
192192

193+
def __enter__(self) -> Self:
194+
self._client.__enter__()
195+
return self
196+
197+
def __exit__(self, *args) -> None:
198+
self._client.__exit__(*args)
199+
200+
def close(self) -> None:
201+
"""This method is to close the sockets opened by the client.
202+
It need not be used when using with a context manager.
203+
204+
:return: None
205+
:rtype: None
206+
"""
207+
self._client.close()
208+
193209
def _format_url(self, hostname: str) -> str:
194210
return _format_url(
195211
container_name=self.container_name,

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,22 @@ def __init__(
131131
self._client._config.version = get_api_version(kwargs) # type: ignore [assignment]
132132
self._configure_encryption(kwargs)
133133

134+
def __enter__(self) -> Self:
135+
self._client.__enter__()
136+
return self
137+
138+
def __exit__(self, *args) -> None:
139+
self._client.__exit__(*args)
140+
141+
def close(self) -> None:
142+
"""This method is to close the sockets opened by the client.
143+
It need not be used when using with a context manager.
144+
145+
:return: None
146+
:rtype: None
147+
"""
148+
self._client.close()
149+
134150
def _format_url(self, hostname):
135151
"""Format the endpoint URL according to the current location
136152
mode hostname.

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,22 @@ def __init__(
150150
self._client = self._build_generated_client()
151151
self._configure_encryption(kwargs)
152152

153+
def __enter__(self) -> Self:
154+
self._client.__enter__()
155+
return self
156+
157+
def __exit__(self, *args) -> None:
158+
self._client.__exit__(*args)
159+
160+
def close(self) -> None:
161+
"""This method is to close the sockets opened by the client.
162+
It need not be used when using with a context manager.
163+
164+
:return: None
165+
:rtype: None
166+
"""
167+
self._client.close()
168+
153169
def _build_generated_client(self) -> AzureBlobStorage:
154170
client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
155171
client._config.version = self._api_version # type: ignore [assignment] # pylint: disable=protected-access
@@ -796,6 +812,9 @@ def list_blobs(
796812
Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted', 'deletedwithversions',
797813
'tags', 'versions', 'immutabilitypolicy', 'legalhold'.
798814
:type include: list[str] or str
815+
:keyword int results_per_page:
816+
Controls the maximum number of Blobs that will be included in each page of results if using
817+
`ItemPaged.by_page()`.
799818
:keyword int timeout:
800819
Sets the server-side timeout for the operation in seconds. For more details see
801820
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
@@ -845,6 +864,9 @@ def list_blob_names(self, **kwargs: Any) -> ItemPaged[str]:
845864
:keyword str name_starts_with:
846865
Filters the results to return only blobs whose names
847866
begin with the specified prefix.
867+
:keyword int results_per_page:
868+
Controls the maximum number of Blobs that will be included in each page of results if using
869+
`ItemPaged.by_page()`.
848870
:keyword int timeout:
849871
Sets the server-side timeout for the operation in seconds. For more details see
850872
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

sdk/storage/azure-storage-blob/azure/storage/blob/_shared/base_client.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,6 @@ def __init__(
127127
self._sdk_moniker = f"storage-{service}/{VERSION}"
128128
self._config, self._pipeline = self._create_pipeline(self.credential, sdk_moniker=self._sdk_moniker, **kwargs)
129129

130-
def __enter__(self):
131-
self._client.__enter__()
132-
return self
133-
134-
def __exit__(self, *args):
135-
self._client.__exit__(*args)
136-
137-
def close(self) -> None:
138-
"""This method is to close the sockets opened by the client.
139-
It need not be used when using with a context manager.
140-
"""
141-
self._client.close()
142-
143130
@property
144131
def url(self) -> str:
145132
"""The full endpoint URL to this entity, including SAS token if used.

sdk/storage/azure-storage-blob/azure/storage/blob/_shared/base_client_async.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,6 @@
5151

5252
class AsyncStorageAccountHostsMixin(object):
5353

54-
def __enter__(self):
55-
raise TypeError("Async client only supports 'async with'.")
56-
57-
def __exit__(self, *args):
58-
pass
59-
60-
async def __aenter__(self):
61-
await self._client.__aenter__()
62-
return self
63-
64-
async def __aexit__(self, *args):
65-
await self._client.__aexit__(*args)
66-
67-
async def close(self) -> None:
68-
"""This method is to close the sockets opened by the client.
69-
It need not be used when using with a context manager.
70-
71-
:return: None
72-
:rtype: None
73-
"""
74-
await self._client.close()
75-
7654
def _format_query_string(
7755
self,
7856
sas_token: Optional[str],

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.27.0b1"
7+
VERSION = "12.27.0"

0 commit comments

Comments
 (0)