Skip to content

Commit 069b779

Browse files
committed
require tornado 4.0 for call_later
1 parent ba20fd2 commit 069b779

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ipykernel/iostream.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,7 @@ def _schedule_flush(self):
258258

259259
# add_timeout has to be handed to the io thread with add_callback
260260
def _schedule_in_thread():
261-
# FIXME: call_later is a little nicer, if we can require tornado ≥ 4
262-
self._flush_timeout = self._io_loop.add_timeout(
263-
self._io_loop.time() + self.flush_interval, self._flush)
261+
self._flush_timeout = self._io_loop.call_later(self.flush_interval, self._flush)
264262
self._io_loop.add_callback(_schedule_in_thread)
265263

266264
def flush(self):

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
'ipython>=4.0.0',
8484
'traitlets',
8585
'jupyter_client',
86+
'tornado>=4.0',
8687
]
8788

8889
extras_require = setuptools_args['extras_require'] = {

0 commit comments

Comments
 (0)