Skip to content

Commit 253c17d

Browse files
committed
Remove dependency on zmq/tornado #23
This should allow installation on pyolite
1 parent 4d181b3 commit 253c17d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

jupyter_ui_poll/_poll.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
TypeVar,
1919
)
2020

21-
import zmq
2221
from IPython import get_ipython
23-
from tornado.queues import QueueEmpty
2422

2523
from ._async_thread import AsyncThread
2624

2725
T = TypeVar("T")
2826

27+
ZMQ_POLLOUT = 2 # zmq.POLLOUT without zmq dependency
28+
2929

3030
class KernelWrapper:
3131
_current: Optional["KernelWrapper"] = None
@@ -96,7 +96,7 @@ async def replay(self):
9696
sys.stderr.flush()
9797
if shell_stream is not None: # 6+
9898
kernel._publish_status("idle", "shell")
99-
shell_stream.flush(zmq.POLLOUT)
99+
shell_stream.flush(ZMQ_POLLOUT)
100100
else:
101101
kernel._publish_status("idle")
102102

@@ -105,7 +105,7 @@ async def do_one_iteration(self):
105105
rr = self._kernel.do_one_iteration()
106106
if isawaitable(rr):
107107
await rr
108-
except QueueEmpty:
108+
except Exception: # pylint: disable=broad-except
109109
# it's probably a bug in ipykernel,
110110
# .do_one_iteration() should not throw
111111
return

setup.cfg

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ setup_requires =
3636
setuptools
3737
install_requires =
3838
ipython
39-
tornado
40-
pyzmq
4139

4240

4341
[options.extras_require]

0 commit comments

Comments
 (0)