File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 76
76
git clone https://github.com/jupyter/jupyter_kernel_test.git
77
77
cd jupyter_kernel_test
78
78
conda env update --name jupyter_kernel_test --file environment.yml
79
- conda install -c conda-forge xeus-cling
80
79
pip install -e ".[test]"
81
80
python -m unittest -v
82
81
Original file line number Diff line number Diff line change 5
5
"""
6
6
# Copyright (c) Jupyter Development Team.
7
7
# Distributed under the terms of the Modified BSD License.
8
- import asyncio
9
8
import time
10
9
import warnings
11
10
12
11
from traitlets import Instance
13
- from zmq .eventloop import ioloop
14
12
15
13
from jupyter_client .restarter import KernelRestarter
16
- from jupyter_client .utils import run_sync
17
14
18
15
19
16
class IOLoopKernelRestarter (KernelRestarter ):
@@ -27,19 +24,19 @@ def _loop_default(self):
27
24
DeprecationWarning ,
28
25
stacklevel = 4 ,
29
26
)
27
+ from zmq .eventloop import ioloop
28
+
30
29
return ioloop .IOLoop .current ()
31
30
32
31
_pcallback = None
33
32
34
33
def start (self ):
35
34
"""Start the polling of the kernel."""
36
35
if self ._pcallback is None :
37
- if asyncio .iscoroutinefunction (self .poll ):
38
- cb = run_sync (self .poll )
39
- else :
40
- cb = self .poll
41
- self ._pcallback = ioloop .PeriodicCallback (
42
- cb ,
36
+ from tornado .ioloop import PeriodicCallback
37
+
38
+ self ._pcallback = PeriodicCallback (
39
+ self .poll ,
43
40
1000 * self .time_to_dead ,
44
41
)
45
42
self ._pcallback .start ()
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ dependencies = [
29
29
" nest-asyncio>=1.5.4" ,
30
30
" python-dateutil>=2.8.2" ,
31
31
" pyzmq>=23.0" ,
32
- " tornado>=6.0 " ,
32
+ " tornado>=6.2 " ,
33
33
" traitlets" ,
34
34
]
35
35
You can’t perform that action at this time.
0 commit comments