deno
deno copied to clipboard
feat(jupyter): allow for ipc transport in Deno
Allowing for IPC transport in Deno will allow Deno to be run on Colab.
(potentially) Closes #21589
We already accept arbitrary transport in our bind_socket setup from the kernel.json, so it was merely a missing feature flag on the zeromq.rs crate.
My debug build has a kernel spec named deno-super-debug and I run it like this:
jupyter console --ConnectionFileMixin.transport=ipc --kernel deno-super-debug
However, I'm running into an issue at least on my Mac.
Bumping to "ready for review" so we can run all the tests
@mmastrac does the following run successfully on your machine with this branch once you swap the kernel name out?
jupyter console --ConnectionFileMixin.transport=ipc --kernel your-deno-kernel-name-for-debugging-here
When running with ipc, kernel_info_requests aren't being passed through:
-<%>- jupyter console --ConnectionFileMixin.transport=ipc --kernel deno
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_console/ptshell.py", line 434, in init_kernel_info
reply = self.client.get_shell_msg(timeout=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_core/utils/__init__.py", line 172, in wrapped
return loop.run_until_complete(inner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_client/client.py", line 143, in _async_get_shell_msg
return await ensure_async(self.shell_channel.get_msg(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_client/channels.py", line 233, in get_msg
raise Empty
_queue.Empty
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/homebrew/bin/jupyter-console", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_core/application.py", line 281, in launch_instance
super().launch_instance(argv=argv, **kwargs)
File "/opt/homebrew/lib/python3.11/site-packages/traitlets/config/application.py", line 1076, in launch_instance
app.initialize(argv)
File "/opt/homebrew/lib/python3.11/site-packages/traitlets/config/application.py", line 118, in inner
return method(app, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_console/app.py", line 136, in initialize
self.init_shell()
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_console/app.py", line 106, in init_shell
self.shell = ZMQTerminalInteractiveShell.instance(parent=self,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/traitlets/config/configurable.py", line 583, in instance
inst = cls(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_console/ptshell.py", line 352, in __init__
self.init_kernel_info()
File "/opt/homebrew/lib/python3.11/site-packages/jupyter_console/ptshell.py", line 437, in init_kernel_info
raise RuntimeError("Kernel didn't respond to kernel_info_request") from e
RuntimeError: Kernel didn't respond to kernel_info_request
Closing this PR since it's wildly out of date. We can pick it up fresh again.