Description
Having kernel crashes on on python3.11.3, ipython8.12.0, notebook6.5.4, jupyterlab 3.6.3 when running a shell/magic command after adding anything other than 'ignore' (without additional specific filters).
Notebook with reproduction examples and environment info:
filterwarnings_kernelcrash.zip
Can't replicate this behaviour on python3.10 using docker-stacks minimal notebook.
Refer to attached ipynb in zip for abit more info, but brief version below.
Example cell that results in immediate crash
import warnings
warnings.filterwarnings('once')
!df -h
Example cells that don't result in immediate kernel crash
##### Cell 1
import warnings
warnings.filterwarnings('once')
##### Cell 2
warnings.filters
###### Cell 3
!df -h
Environment info, reduced to packages I felt were relevant, refer to zipped notebook for full list. Jupyter installed via pip install jupyterhub jupyterlab notebook
so just latest stable picked up from pypi.
!cat /etc/redhat-release
Rocky Linux release 8.7 (Green Obsidian)
!uname -r
4.18.0-372.9.1.el8.x86_64
%pip freeze
ipykernel==6.22.0
ipympl==0.9.3
ipython==8.12.0
ipython-genutils==0.2.0
ipywidgets==8.0.6
jupyter-events==0.6.3
jupyter-resource-usage==0.7.2
jupyter-server-mathjax==0.2.6
jupyter-telemetry==0.1.0
jupyter-ydoc==0.2.4
jupyter_client==8.2.0
jupyter_core==5.3.0
jupyter_server==2.5.0
jupyter_server_fileid==0.9.0
jupyter_server_terminals==0.4.4
jupyter_server_ydoc==0.8.0
jupyterhub==3.1.1
jupyterlab==3.6.3
jupyterlab-code-formatter==1.6.1
jupyterlab-favorites==3.1.1
jupyterlab-pygments==0.2.2
jupyterlab-system-monitor==0.8.0
jupyterlab-topbar==0.6.1
jupyterlab-widgets==3.0.7
jupyterlab_server==2.22.1
nbclassic==0.5.5
nbclient==0.7.3
nbconvert==7.3.1
nbdime==3.1.1
nbformat==5.8.0
notebook==6.5.4
notebook_shim==0.2.2
pyzmq==25.0.2