Skip to content

Commit 0fa5439

Browse files
Remove direct use of asyncio (#1266)
1 parent 1ca8f2c commit 0fa5439

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

ipykernel/iostream.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Copyright (c) IPython Development Team.
44
# Distributed under the terms of the Modified BSD License.
55

6-
import asyncio
76
import atexit
87
import contextvars
98
import io
@@ -99,7 +98,6 @@ def __init__(self, socket, pipe=False):
9998
self._event_pipes: Dict[threading.Thread, Any] = {}
10099
self._event_pipe_gc_lock: threading.Lock = threading.Lock()
101100
self._event_pipe_gc_seconds: float = 10
102-
self._event_pipe_gc_task: Optional[asyncio.Task[Any]] = None
103101
self._setup_event_pipe()
104102
tasks = [self._handle_event, self._run_event_pipe_gc]
105103
if pipe:

ipykernel/kernelbase.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# Distributed under the terms of the Modified BSD License.
55
from __future__ import annotations
66

7-
import asyncio
87
import inspect
98
import itertools
109
import logging
@@ -1258,7 +1257,7 @@ async def _progressively_terminate_all_children(self):
12581257
delay,
12591258
children,
12601259
)
1261-
await asyncio.sleep(delay)
1260+
await sleep(delay)
12621261

12631262
async def _at_shutdown(self):
12641263
"""Actions taken at shutdown by the kernel, called by python's atexit."""

0 commit comments

Comments
 (0)