Skip to content

Commit

Permalink
Remove dependency on zmq/tornado #23
Browse files Browse the repository at this point in the history
This should allow installation on pyolite
  • Loading branch information
Kirill888 committed Oct 27, 2022
1 parent 503aca2 commit 3f50684
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions jupyter_ui_poll/_poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
TypeVar,
)

import zmq
from IPython import get_ipython
from tornado.queues import QueueEmpty

from ._async_thread import AsyncThread

T = TypeVar("T")

ZMQ_POLLOUT = 2 # zmq.POLLOUT without zmq dependency


class KernelWrapper:
_current: Optional["KernelWrapper"] = None
Expand Down Expand Up @@ -97,7 +97,7 @@ async def replay(self):
sys.stderr.flush()
if shell_stream is not None: # 6+
kernel._publish_status("idle", "shell")
shell_stream.flush(zmq.POLLOUT)
shell_stream.flush(ZMQ_POLLOUT)
else:
kernel._publish_status("idle")

Expand All @@ -106,7 +106,7 @@ async def do_one_iteration(self):
rr = self._kernel.do_one_iteration()
if isawaitable(rr):
await rr
except QueueEmpty:
except Exception: # pylint: disable=broad-except
# it's probably a bug in ipykernel,
# .do_one_iteration() should not throw
return
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ setup_requires =
setuptools
install_requires =
ipython
tornado
pyzmq


[options.extras_require]
Expand Down

0 comments on commit 3f50684

Please sign in to comment.