Skip to content

Add aio extras to azure-cosmos for async dependencies#47143

Merged
simorenoh merged 3 commits into
mainfrom
copilot/fix-aiohttp-dependency
May 28, 2026
Merged

Add aio extras to azure-cosmos for async dependencies#47143
simorenoh merged 3 commits into
mainfrom
copilot/fix-aiohttp-dependency

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

azure.cosmos.aio requires aiohttp at runtime but the package doesn't declare it as a dependency, resulting in ModuleNotFoundError for users who haven't independently installed it.

Changes

  • Added extras_require={"aio": ["azure-core[aio]>=1.30.0"]} to setup.py, following the same pattern as azure-storage-queue and other SDK packages
  • Updated CHANGELOG.md

Usage

pip install azure-cosmos[aio]

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 aio extras to azure-cosmos for async dependencies May 26, 2026
Copilot AI requested a review from simorenoh May 26, 2026 21:00
Comment thread sdk/cosmos/azure-cosmos/CHANGELOG.md Outdated
@simorenoh simorenoh marked this pull request as ready for review May 26, 2026 21:49
@simorenoh simorenoh requested a review from a team as a code owner May 26, 2026 21:49
Copilot AI review requested due to automatic review settings May 26, 2026 21:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 aio extras metadata to setup.py via azure-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.

@simorenoh simorenoh merged commit 701a0a3 into main May 28, 2026
38 checks passed
@simorenoh simorenoh deleted the copilot/fix-aiohttp-dependency branch May 28, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aiohttp not defined as a dependency to azure-cosmos

5 participants