#1149388 jupyter-server-terminals: FTBFS against python 3.15rc2 (some tests fail with error 500)

#1149388#5
Date:
2026-09-29 18:47:47 UTC
From:
To:
Hi!

While rebuilding the python related packages against the Python 3.15rc2
version we found that jupyter-server-terminals fails to build from
source:
https://debusine.debian.net/debian/r-python-python3.15/artifact/4855869/

There are several errors in log, similar to this one:
----------------------------- Captured stderr call 
-----------------------------
[W 2026-09-24 22:37:39.281 TerminalsExtensionApp] wrote error:
'Unhandled error'
[E 2026-09-24 22:37:39.281 TerminalsExtensionApp] {
       "Host": "127.0.0.1:38553",
       "User-Agent": "Tornado/6.5.5"
     }
[E 2026-09-24 22:37:39.281 TerminalsExtensionApp] 500 POST
/a%40b/api/terminals (f9185ef712b7464faeec794057ab41fc@127.0.0.1) 4.33ms
referer=None
------------------------------ Captured log call 
-------------------------------
DEBUG    ServerApp:identity.py:499 Accepting
token-authenticated request from 127.0.0.1
DEBUG    TerminalsExtensionApp:identity.py:530 Generating new
user for token-authenticated request: f9185ef712b7464faeec794057ab41fc
DEBUG    TerminalsExtensionApp:api_handlers.py:60 Opening
terminal in:
/tmp/pytest-of-sbuild/pytest-0/test_terminal_create_with_cwd0/terminal_path
ERROR    ServerApp:web.py:1966 Uncaught exception POST
/a%40b/api/terminals (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:38553',
method='POST', uri='/a%40b/api/terminals', version='HTTP/1.1',
remote_ip='127.0.0.1')
Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/tornado/web.py", line 1880, in
_execute
     result = await result
              ^^^^^^^^^^^^
   File
"/usr/lib/python3/dist-packages/jupyter_server/auth/decorator.py", line
71, in inner
     out = method(self, *args, **kwargs)
   File
"/build/reproducible-path/jupyter-server-terminals-0.5.3/.pybuild/cpython3_3.15/build/jupyter_server_terminals/api_handlers.py",
line 63, in post
     model = self.terminal_manager.create(**data)
   File
"/build/reproducible-path/jupyter-server-terminals-0.5.3/.pybuild/cpython3_3.15/build/jupyter_server_terminals/terminalmanager.py",
line 51, in create
     name, term = self.new_named_terminal(**kwargs)
                  ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/terminado/management.py", line
404, in new_named_terminal
     term = self.new_terminal(**kwargs)
   File "/usr/lib/python3/dist-packages/terminado/management.py", line
233, in new_terminal
     return PtyWithClients(argv, env, cwd)
   File "/usr/lib/python3/dist-packages/terminado/management.py", line
58, in __init__
     self.ptyproc = PtyProcessUnicode.spawn(**kwargs)
                    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/ptyprocess/ptyprocess.py", line
230, in spawn
     pid, fd = pty.fork()
               ~~~~~~~~^^
   File "/usr/lib/python3.15/pty.py", line 66, in fork
     pid, fd = os.forkpty()
               ~~~~~~~~~~^^
DeprecationWarning: This process (pid=101) is multi-threaded, use of
forkpty() may lead to deadlocks in the child.
WARNING  TerminalsExtensionApp:handlers.py:779 wrote error:
'Unhandled error'
ERROR    TerminalsExtensionApp:log.py:106 {
   "Host": "127.0.0.1:38553",
   "User-Agent": "Tornado/6.5.5"
}
ERROR    TerminalsExtensionApp:log.py:107 500 POST
/a%40b/api/terminals (f9185ef712b7464faeec794057ab41fc@127.0.0.1) 4.33ms
referer=None


Please note that while we ran into this error during the rebuild against
Python 3.15, that doesn't mean that the root cause for the failure is
necessarily the new Python version.

Setting the severity to important for now. Once Python 3.15 is released
and later added to python3-defaults, this bug will become release
critical.