Add aio extras to azure-cosmos for async dependencies#47143
Merged
Conversation
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>
Copilot
AI
changed the title
[WIP] Fix aiohttp not defined as a dependency for azure-cosmos
Add May 26, 2026
aio extras to azure-cosmos for async dependencies
simorenoh
reviewed
May 26, 2026
tvaron3
approved these changes
May 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an optional async dependency extra for azure-cosmos, enabling users of azure.cosmos.aio to install required async transport dependencies with pip install azure-cosmos[aio].
Changes:
- Added
aioextras metadata tosetup.pyviaazure-core[aio]>=1.30.0. - Documented the packaging change in the unreleased changelog.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
sdk/cosmos/azure-cosmos/setup.py |
Adds the optional aio extra for async dependency installation. |
sdk/cosmos/azure-cosmos/CHANGELOG.md |
Records the new async extra under unreleased features. |
kushagraThapar
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
azure.cosmos.aiorequiresaiohttpat runtime but the package doesn't declare it as a dependency, resulting inModuleNotFoundErrorfor users who haven't independently installed it.Changes
extras_require={"aio": ["azure-core[aio]>=1.30.0"]}tosetup.py, following the same pattern asazure-storage-queueand other SDK packagesUsage