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

[Core] Add anyio dependency for lock handling #33307

Merged
merged 2 commits into from Nov 30, 2023
Merged

Conversation

pvaneck
Copy link
Member

@pvaneck pvaneck commented Nov 27, 2023

  • This introduces anyio as a dependency to azure-core, and we leverage its Lock class in AsyncBearerTokenCredentialPolicy to allow it to work with both asyncio and trio concurrency mechanisms.
  • requests was also bumped to allow the mindependency check to pass with the minimum version of anyio.

Closes: #32968

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

- This introduces anyio as a dependency to azure-core and we leverage
  its `Lock` class in `AsyncBearerTokenCredentialPolicy` to allow it to
  work with both asyncio and trio concurrency mechanisms.
- Requests was also bumped to allow the mindependency check to pass with
  the minimum version of `anyio`.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
@pvaneck
Copy link
Member Author

pvaneck commented Nov 30, 2023

/check-enforcer override

@pvaneck pvaneck merged commit 52d1984 into Azure:main Nov 30, 2023
261 of 265 checks passed
@pvaneck pvaneck deleted the anyio branch November 30, 2023 02:08
@akx
Copy link
Contributor

akx commented Dec 21, 2023

😩

This forces installation of multiple additional transitive dependencies for any and all users of azure-core.

anyio-4.2.0 exceptiongroup-1.2.0 sniffio-1.3.0

It might be better to explore whether the same thing could be done without forcing the dependency; after all, there are plenty of other places in azure-core that only support asyncio still.

@akx akx mentioned this pull request Dec 21, 2023
6 tasks
@xiangyan99
Copy link
Member

there are plenty of other places in azure-core that only support asyncio still.

Thanks for your feedback.

In terms of "there are plenty of other places in azure-core that only support asyncio still."

if you don't mind, could you share more details?

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.

AsyncBearerTokenCredentialPolicy depends on asyncio
6 participants