jupyter-server / jupyter_server

The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.
https://jupyter-server.readthedocs.io
BSD 3-Clause "New" or "Revised" License
489 stars 308 forks source link

Latest release 2.9.0 broken on install #1345

Closed krassowski closed 1 year ago

krassowski commented 1 year ago

It looks #1341 depends on a jupyter_client 8.5.0 but requirements have a much more relaxed 7.4.4 pin:

https://github.com/jupyter-server/jupyter_server/blob/4cb13ce10d4725ad7e7d500c1b7fcbd95689d6d8/pyproject.toml#L33

This leads to "Error Starting Kernel" in Jupyter applications:

Traceback (most recent call last):
  File "/lib/python3.9/site-packages/tornado/web.py", line 1786, in _execute
    result = await result
  File "/lib/python3.9/site-packages/jupyter_server/services/sessions/handlers.py", line 172, in patch
    await sm.update_session(session_id, **changes)
  File "/lib/python3.9/site-packages/jupyter_server/services/sessions/sessionmanager.py", line 469, in update_session
    self.kernel_manager.update_env(kernel_id=kernel_id, env=self.get_kernel_env(path, name))
  File "/lib/python3.9/site-packages/jupyter_client/multikernelmanager.py", line 226, in update_env
    self._kernels[kernel_id].update_env(env)
TypeError: update_env() takes 1 positional argument but 2 were given

We can either pass env conditionally or increase the required client version

CC @Carreau

krassowski commented 1 year ago

We already a number of users reporting this issue: https://github.com/jupyterlab/jupyterlab/issues/15301 It looks that https://github.com/jupyter/jupyter_client/pull/987 introduced the argument as required rather than default so some users see breakage due to updated client but not server, and some due to updated server but not client. Maybe both should be yanked for now?

Carreau commented 1 year ago

This is weird. I'll check.

Carreau commented 1 year ago

Oh, the parameter is kwarg only. It's a 3 char fix.

Carreau commented 1 year ago

See https://github.com/jupyter/jupyter_client/pull/989