Skip to content
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

Python 3.12 support blocked by aiohttp #34093

Closed
martin-traverse opened this issue Feb 1, 2024 · 8 comments
Closed

Python 3.12 support blocked by aiohttp #34093

martin-traverse opened this issue Feb 1, 2024 · 8 comments
Labels
Azure.Core 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. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@martin-traverse
Copy link

Is your feature request related to a problem? Please describe.

To use async IO with the azure-core library there is a dependency on aiohttp. The aiohttp project currently does not publish wheels for Python 3.12. Although the async transport is an optional dependency of azure-core, it is a hard dependency of the Azure fsspec implementation, adlfs. We would like to support Python 3.12 on Azure and cannot do so until this issue is resolved. This will also be impacting other projects that require async transport.

The lead maintainers of the aiohttp project are saying they need help to make the necessary updates, and that there are significant testing gaps which they are concerned about and wish to fix before a 3.12-compatible version can be released. To drive the point home, they also published this image in a recent thread on the subject:

301373614-f71722c2-f634-4cab-b828-fe0ce77e1192

Describe the solution you'd like

I think this is a broader issues than simply getting the 3.12 package for aiohttp out of the door. I can see two potential solutions:

  • MS can contribute development effort to aiohttp, to resolve this specific issue and help maintain the package going forward as and when issues or feature requirements arise
  • I see there is an alternate async transport in development using HTTPX, with sample code in the azure-core-experimental library and also in a separate module called "corehttp". If the HTTPX transport were completed and made available in azure-core that should remove the dependency on aiohttp for projects requiring async, including the Azure implementation of fsspec.

Describe alternatives you've considered

The Apache Arrow project is also working on an Azure implementation of their FileSystem interface, for projects using Apache Arrow these Python libraries may not be needed at all once that is available. This might help my particular project eventually, but probably doesn't help most people who want to use Python on Azure.

Additional context

Issue thread for aiohttp: aio-libs/multidict#887
Note in adlfs about requirement of aiohttp: fsspec/adlfs#452
Azure core docs on HTTP transport: CLIENT_LIBRARY_DEVELOPER#transport
Azure core experimental library: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core-experimental
Azure corehttp library: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/corehttp

@github-actions github-actions bot added Azure.Core 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. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 1, 2024
@xiangyan99
Copy link
Member

Thanks for reaching out.

It seems to me aiohttp has released 3.12 support. https://pypi.org/project/aiohttp/#files

Did I miss anything?

@xiangyan99 xiangyan99 added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-triage Workflow: This issue needs the team to triage. labels Feb 1, 2024
Copy link

github-actions bot commented Feb 1, 2024

Hi @martin-traverse. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@martin-traverse
Copy link
Author

There is a thing called "multidict", a library which is part of the AIO project and sits near the bottom of the stack. The aiohttp package has a hard dependency on multidict, and multidict is not available for Python 3.12.

https://github.com/aio-libs/multidict
https://pypi.org/project/multidict/#files

Running pip install aiohttp, or pip install adlfs or even pip install azure-core[aio] on Python 3.12 will trigger a build for multidict, which fails if you don't have the C build chain installed and configured.

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Feb 1, 2024
@kristapratico
Copy link
Member

@kashifkhan

@xiangyan99
Copy link
Member

There was a new multidict library released which supported 3.12 about half hours ago.
(I saw you were in the thread so maybe you knew it already).

@xiangyan99 xiangyan99 added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Feb 1, 2024
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Feb 1, 2024
Copy link

github-actions bot commented Feb 1, 2024

Hi @martin-traverse. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

@martin-traverse
Copy link
Author

The issue in aiohttp is now resolved which addresses the immediate problem, Python 3.12 now works with azure-core AIO so fsspec (adlfs) and anything else using async storage is unblocked (including my own project). I am happy if this issue is closed.

I do think it is worth discussing the broader point around the open source dependency tree. There are obviously big upsides to a shared ecosystem of common components but two major downsides are inconsistent support model and proliferation of dependency bloat. These issues can be mitigated in specific cases, either by contributing upstream or selecting dependencies with a well defined support model and small transitive dependency tree.

In this case both options are available, ether working with the upstream project or selecting alternate dependencies could help alleviate issues before they arise.

Copy link

github-actions bot commented Feb 9, 2024

Hi @martin-traverse, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

@github-actions github-actions bot closed this as completed Feb 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core 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. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants