jupyter/notebook

Support free-threaded Python build

Closed this issue · 2 comments

I don't see an issue for this yet, so I figured I'd open one.

Currently, you can do pip install jupyter and at least on my Mac development machine with the xcode command line tools installed, you do eventually build and install a jupyter wheel. However:

goldbaum at Nathans-MBP in ~
○  python -VV
Python 3.13.0 experimental free-threading build (main, Oct 10 2024, 10:28:54) [Clang 16.0.0 (clang-1600.0.26.3)]

goldbaum at Nathans-MBP in ~
○  jupyter notebook
[1]    82211 segmentation fault  jupyter notebook

Unfortunately doing this in a Python launched under a C debugger doesn't give me a useful traceback from the segfault:

goldbaum at Nathans-MBP in ~
○  lldb $(pyenv which python) -- -m jupyter notebook
(lldb) target create "/Users/goldbaum/.pyenv/versions/3.13.0t/bin/python"
Current executable set to '/Users/goldbaum/.pyenv/versions/3.13.0t/bin/python' (arm64).
(lldb) settings set -- target.run-args  "-m" "jupyter" "notebook"
(lldb) r
Process 82671 launched: '/Users/goldbaum/.pyenv/versions/3.13.0t/bin/python' (arm64)
Process 82671 exited with status = 5 (0x00000005) Terminated due to signal 5
(lldb) bt
error: Command requires a process which is currently stopped.

Likely this is happening because one or more of Jupyter's dependencies don't support free-threading yet (e.g. CFFI).

It would be nice if this issue could be detected and surfaced earlier with a useful error message before the crash happens.

Thanks @ngoldbaum for reporting.

I see there is now a similar issue in JupyterLab: jupyterlab/jupyterlab#16915

Since Notebook is based on JupyterLab, maybe we can close this issue in favor of jupyterlab/jupyterlab#16915, to keep the discussion in one place?

closed in favor of the jupyterlab issue