diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index 9e1049cbb..99d409e4c 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -76,7 +76,6 @@ jobs: git clone https://github.com/jupyter/jupyter_kernel_test.git cd jupyter_kernel_test conda env update --name jupyter_kernel_test --file environment.yml - conda install -c conda-forge xeus-cling pip install -e ".[test]" python -m unittest -v diff --git a/jupyter_client/ioloop/restarter.py b/jupyter_client/ioloop/restarter.py index 54f96af8d..e36f3a33d 100644 --- a/jupyter_client/ioloop/restarter.py +++ b/jupyter_client/ioloop/restarter.py @@ -5,15 +5,12 @@ """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -import asyncio import time import warnings from traitlets import Instance -from zmq.eventloop import ioloop from jupyter_client.restarter import KernelRestarter -from jupyter_client.utils import run_sync class IOLoopKernelRestarter(KernelRestarter): @@ -27,6 +24,8 @@ def _loop_default(self): DeprecationWarning, stacklevel=4, ) + from zmq.eventloop import ioloop + return ioloop.IOLoop.current() _pcallback = None @@ -34,12 +33,10 @@ def _loop_default(self): def start(self): """Start the polling of the kernel.""" if self._pcallback is None: - if asyncio.iscoroutinefunction(self.poll): - cb = run_sync(self.poll) - else: - cb = self.poll - self._pcallback = ioloop.PeriodicCallback( - cb, + from tornado.ioloop import PeriodicCallback + + self._pcallback = PeriodicCallback( + self.poll, 1000 * self.time_to_dead, ) self._pcallback.start() diff --git a/pyproject.toml b/pyproject.toml index f7a2712b3..8e370723b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "nest-asyncio>=1.5.4", "python-dateutil>=2.8.2", "pyzmq>=23.0", - "tornado>=6.0", + "tornado>=6.2", "traitlets", ]