You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/cosmos/azure-cosmos/CHANGELOG.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,19 @@
1
1
## Release History
2
2
3
-
### 4.5.2b4 (Unreleased)
3
+
### 4.5.2b4 (2024-02-02)
4
4
This version and all future versions will require Python 3.8+.
5
5
6
6
#### Features Added
7
7
* Added **preview** support for Computed Properties on Python SDK (Must be enabled on the account level before it can be used). See [PR 33626](https://github.com/Azure/azure-sdk-for-python/pull/33626).
8
8
9
-
#### Breaking Changes
10
-
11
9
#### Bugs Fixed
12
-
13
-
#### Other Changes
10
+
* Made use of `response_hook` thread-safe in the sync client. See [PR 33790](https://github.com/Azure/azure-sdk-for-python/pull/33790).
11
+
* Fixed bug with the session container not being properly maintained. See [33738](https://github.com/Azure/azure-sdk-for-python/pull/33738).
14
12
15
13
### 4.5.2b3 (2023-11-10)
16
14
17
15
#### Features Added
18
-
* Added support for capturing Index Metrics in query operations. See [PR 33034](https://github.com/Azure/azure-sdk-for-python/pull/33034)
16
+
* Added support for capturing Index Metrics in query operations. See [PR 33034](https://github.com/Azure/azure-sdk-for-python/pull/33034).
Copy file name to clipboardExpand all lines: sdk/cosmos/azure-cosmos/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -475,7 +475,7 @@ For more information on TTL, see [Time to Live for Azure Cosmos DB data][cosmos_
475
475
### Using the asynchronous client
476
476
477
477
The asynchronous cosmos client is a separate client that looks and works in a similar fashion to the existing synchronous client. However, the async client needs to be imported separately and its methods need to be used with the async/await keywords.
478
-
The Async client needs to be initialized and closed after usage, which can be done manually or with the use of a context manager. The example below shows how to do so manually.
478
+
The Async client needs to be initialized and closed after usage, which can be done manually or with the use of a context manager. The example below shows how to do so manually. We don't recommend doing it this way, since it requires that you manually call __aenter__() before using the client.
479
479
480
480
```python
481
481
from azure.cosmos.aio import CosmosClient
@@ -488,6 +488,7 @@ CONTAINER_NAME = 'products'
488
488
489
489
asyncdefcreate_products():
490
490
client = CosmosClient(URL, credential=KEY)
491
+
await client.__aenter__() # this piece is important for the SDK to cache account information
await client.close() # the async client must be closed manually if it's not initialized in a with statement
501
502
```
502
503
503
-
Instead of manually opening and closing the client, it is highly recommended to use the `async with` keywords. This creates a context manager that will initialize and later close the client once you're out of the statement. The example below shows how to do so.
504
+
Instead of manually opening and closing the client, it is highly recommended to use the `async with` keywords. This creates a context manager that will initialize and later close the client once you're out of the statement, as well as cache important information the SDK needs. The example below shows how to do so.
0 commit comments