diff --git a/ipykernel/control.py b/ipykernel/control.py index ee475188d..1aaf9a7e8 100644 --- a/ipykernel/control.py +++ b/ipykernel/control.py @@ -1,12 +1,12 @@ from threading import Thread -from tornado.platform.asyncio import AsyncIOLoop +from tornado.ioloop import IOLoop class ControlThread(Thread): def __init__(self, **kwargs): Thread.__init__(self, name="Control", **kwargs) - self.io_loop = AsyncIOLoop(make_current=False) + self.io_loop = IOLoop(make_current=False) self.pydev_do_not_trace = True self.is_pydev_daemon_thread = True diff --git a/ipykernel/iostream.py b/ipykernel/iostream.py index 43644c224..aeaf38e02 100644 --- a/ipykernel/iostream.py +++ b/ipykernel/iostream.py @@ -18,10 +18,7 @@ import zmq from jupyter_client.session import extract_header - -# AsyncIOLoop always creates a new asyncio event loop, -# rather than the default AsyncIOMainLoop -from tornado.platform.asyncio import AsyncIOLoop +from tornado.ioloop import IOLoop from zmq.eventloop.zmqstream import ZMQStream # ----------------------------------------------------------------------------- @@ -60,7 +57,7 @@ def __init__(self, socket, pipe=False): self.background_socket = BackgroundSocket(self) self._master_pid = os.getpid() self._pipe_flag = pipe - self.io_loop = AsyncIOLoop(make_current=False) + self.io_loop = IOLoop(make_current=False) if pipe: self._setup_pipe_in() self._local = threading.local()