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

Set async library contextvar for asyncio in py3.6 #24

Closed

Conversation

mwakaba2
Copy link

@mwakaba2 mwakaba2 commented May 9, 2021

Problem

The AsyncLibraryNotFoundError is getting raised for an asyncio task in py3.6.

Solution

In sniffio 1.2.0, the context var was not getting set for py3.6.
I fixed the if condition and added it back in to set the current async library contextvar for py3.6.
mwakaba2@9126c63#diff-acce973c41d5df27520af82067e245d6f961d963ea70e214028ce8889b5dc8e8

I also tested this with the latest sniffio commit and the if condition is still needed to prevent the error.

Dependency

This fix is needed to fix Jupyter Server #505

TODO

  • Fix tests

@mwakaba2 mwakaba2 closed this May 9, 2021
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.

Anyio version v3 breaks AsyncContentsManager for python3.6
1 participant