← All tasks
pythonAzure/azure-sdk-for-python #41737Not a task: already works

`aiohttp` not defined as a dependency to `azure-cosmos`

envgap__Azure__azure-sdk-for-python-41737

01 / FAILURE SIGNATURE

As reported upstream

Calling `azure.cosmos.aio.CosmosClient.from_connection_string("replace_with_conn_string")` will give a `ModuleNotFoundError: No module named 'aiohttp'` if not explicitly installed
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
90af8cfff185288e9118b7a65492729c5476a6b8
Manifest
sdk/cosmos/azure-cosmos/setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

Azure/azure-sdk-for-python #41737 · read the original issue
- **Package Name**: `azure-cosmos`
- **Package Version**: 4.9.0
- **Operating System**: Linux
- **Python Version**: 3.12

**Describe the bug**
When using `azure.cosmos.aio`, the `aiohttp` dependency is not installed by default. I am not able to see any docs 

**To Reproduce**
Steps to reproduce the behavior:
Calling `azure.cosmos.aio.CosmosClient.from_connection_string("replace_with_conn_string")` will give a `ModuleNotFoundError: No module named 'aiohttp'` if not explicitly installed

**Expected behavior**
I think the best solution would be to define `extras` for the `azure-cosmos` package that also installs necessary dependencies for the async functions, e.g `azure-cosmos[aio]`. It would also be good if this documented

**Screenshots**
N/A

**Additional context**
N/A
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]