Slides: https://ianthomas23.github.io/jupytercon2025-subshells
Github repository: https://github.com/ianthomas23/jupytercon2025-subshells
Cannot interact with a kernel whilst it is busy executing code
Would like to:
A separate thread of execution which can run code independently of the main shell and shares the same memory space
Multithreading for Jupyter kernels
Changes to the Jupyter protocol occur via Jupyter Enhancement Proposals
JEP91 Jupyter kernel subshells
PR proposing subshells with discussion
Two alternative implementations discussed:
Kernel subshells = new subshell ID, same kernel ID
Dependent kernels = pretends to be a full kernel with new kernel ID
Timeline:
ipykernel
python
shell
control
stdin
iopub
subshell_id
create_subshell_request
kernel_info_request
supported_features
Major difference is new shell channel thread
ipykernel >= 7.0.0
jupyterlab >= 4.4.0
ipywidgets
jupyterlab >= 4.4.4
%matplotlib ipympl
ipympl >= 0.9.8
Only use subshells if you understand multithreading!
create
list
delete
%subshell
ipykernel 7
jupyterlab
jupyterlite
xeus
pthreads
anyio
tornado
asyncio
ipympl