Skip to content

Commit 701a0a3

Browse files
Copilotsimorenoh
andauthored
Add aio extras to azure-cosmos for async dependencies (#47143)
* Initial plan * Add `aio` extras_require to azure-cosmos for async dependencies Adds an optional `aio` dependency extra to the azure-cosmos package so users can install async dependencies (aiohttp via azure-core[aio]) with `pip install azure-cosmos[aio]`. This follows the same pattern used by other Azure SDK packages like azure-storage-queue. Fixes #39457 Co-authored-by: simorenoh <30335873+simorenoh@users.noreply.github.com> * Apply suggestion from @simorenoh --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: simorenoh <30335873+simorenoh@users.noreply.github.com>
1 parent de49c08 commit 701a0a3

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

sdk/cosmos/azure-cosmos/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#### Features Added
66
* Added **preview** support for the optional `embeddingSource` field on entries in `vector_embedding_policy.vectorEmbeddings`, which allows the service to generate vector embeddings from the specified item paths. Requires the embedding-generation service to be enabled on the account. See [46870](https://github.com/Azure/azure-sdk-for-python/pull/46870)
7+
* Added `aio` extras to the package, allowing users to install async dependencies with `pip install azure-cosmos[aio]`. See [PR 47143](https://github.com/Azure/azure-sdk-for-python/pull/47143)
78

89
#### Breaking Changes
910
* `CosmosItemPaged.get_response_headers()` and `CosmosAsyncItemPaged.get_response_headers()` now return a single `CaseInsensitiveDict` (the latest page) instead of `List[CaseInsensitiveDict]` (introduced in 4.16.0b1); `get_last_response_headers()` has been removed. This avoids unbounded memory growth on large queries. **Migration:** code that previously accessed `headers[i]['x-ms-request-charge']` should switch to `headers['x-ms-request-charge']` for the latest page, or pass `response_hook=` to the query method to receive per-page headers as they arrive. See [PR 47172](https://github.com/Azure/azure-sdk-for-python/pull/47172).

sdk/cosmos/azure-cosmos/setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,9 @@
8080
"azure-core>=1.30.0",
8181
"typing-extensions>=4.6.0"
8282
],
83+
extras_require={
84+
"aio": [
85+
"azure-core[aio]>=1.30.0",
86+
],
87+
},
8388
)

0 commit comments

Comments
 (0)