Skip to content

Commit

Permalink
Merge pull request #22 from python-trio/graingert-patch-1
Browse files Browse the repository at this point in the history
stop setting asyncio in the contextvar
  • Loading branch information
altendky authored Mar 8, 2021
2 parents e8de439 + 9126c63 commit 5ef8e9d
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 5ef8e9d

Please sign in to comment.