Skip to content

List aiohttp in optional dependencies #26200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dimaqq opened this issue Sep 14, 2022 · 3 comments · Fixed by #26791
Closed

List aiohttp in optional dependencies #26200

dimaqq opened this issue Sep 14, 2022 · 3 comments · Fixed by #26791
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files)

Comments

@dimaqq
Copy link

dimaqq commented Sep 14, 2022

Versions

azure-core @ file:///home/dima/.cache/pypoetry/artifacts/1d/05/81/2e2cfcd2a8815ee1fd0d0c76864a0bc9db9eb1d56da502844a29f92d8d/azure_core-1.25.1-py3-none-any.whl
azure-storage-blob @ file:///home/dima/.cache/pypoetry/artifacts/92/6a/74/89433492a804a762d9b6b76861cc31b8e9c1cf53919c260a51047eeec5/azure_storage_blob-12.13.1-py3-none-any.whl
Python 3.10.6 (main, Aug  2 2022, 15:11:28) [GCC 9.4.0] on linux

Describe the bug
The .aio API of this library depends on aiohttp but the package does not require it.

To Reproduce
Steps to reproduce the behavior:

  1. pip install azure-storage-blob
  2. `python -c "from azure.storage.blob.aio import BlobServiceClient"
  3. Fails because aiohttp is not installed

Expected behavior
Expected the package to have an optional dependency on aiohttp.

Example:

https://github.com/HENNGE/aiodynamo/blob/1e3ea24042ac1ca3914aedd9d2ffcf0b1d0ef226/pyproject.toml#L23-L32

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 14, 2022
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 14, 2022
@azure-sdk azure-sdk added Client This issue points to a problem in the data-plane of the library. needs-team-triage Workflow: This issue needs the team to triage. Storage Storage Service (Queues, Blobs, Files) labels Sep 14, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 14, 2022
@kristapratico kristapratico removed the needs-team-triage Workflow: This issue needs the team to triage. label Sep 14, 2022
@kristapratico
Copy link
Member

Hi @dimaqq thanks for your feedback, we'll look into this issue and get back to you as soon as possible.

@jalauzon-msft
Copy link
Member

Hi @dimaqq Dima, the "hard" dependency on aiohttp from azure-storage-blob was actually removed in our latest preview release 12.14.0b1 and will not be present in our next full release. We were actually importing something from aiohttp which was not supposed to be the case since the client libraries should remain Transport agnostic.

That being said, typically aiohttp is used for the azure.storage.blob.aio (though it does not have to be). I'm not exactly sure on our approach to handling this dependency or if we should add it to azure-core or individual libraries.

@lmazuel, @xiangyan99 any thoughts on this? Should we be adding aiohttp as an optional dependency anywhere?

@jalauzon-msft jalauzon-msft linked a pull request Oct 12, 2022 that will close this issue
@jalauzon-msft
Copy link
Member

Hi again @dimaqq Dima, I have just created a PR which adds an extras_requires to our setup.py file called aio that will install aiohttp along with blob package install. Since we use the setup.py method of defining dependencies, this was the best way to specify an optional dependency.

After this is merged and released, you will be able to do pip install azure-storage-blob[aio] to install aiohttp along with the blob SDK. Thanks for bringing this up so we could get it added!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants