Skip to content

Commit

Permalink
stop setting asyncio in the contextvar
Browse files Browse the repository at this point in the history
Refs #20
  • Loading branch information
graingert committed Mar 4, 2021
1 parent e8de439 commit 9126c63
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions sniffio/_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ async def generic_sleep(seconds):
current_task = asyncio.Task.current_task # type: ignore[attr-defined]
try:
if current_task() is not None:
if (3, 7) <= sys.version_info:
# asyncio has contextvars support, and we're in a task, so
# we can safely cache the sniffed value
current_async_library_cvar.set("asyncio")
return "asyncio"
except RuntimeError:
pass
Expand Down

0 comments on commit 9126c63

Please sign in to comment.