Skip to content

Commit 5ef8e9d

Browse files
authored
Merge pull request #22 from python-trio/graingert-patch-1
stop setting asyncio in the contextvar
2 parents e8de439 + 9126c63 commit 5ef8e9d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

sniffio/_impl.py

-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ async def generic_sleep(seconds):
6565
current_task = asyncio.Task.current_task # type: ignore[attr-defined]
6666
try:
6767
if current_task() is not None:
68-
if (3, 7) <= sys.version_info:
69-
# asyncio has contextvars support, and we're in a task, so
70-
# we can safely cache the sniffed value
71-
current_async_library_cvar.set("asyncio")
7268
return "asyncio"
7369
except RuntimeError:
7470
pass

0 commit comments

Comments
 (0)