-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__session__ picks up new name of a notebook only through specific kernel restarts #1102
Comments
I'll investigate. It might be an issue on the Jupyter Server side. |
Hi, I'm still able to reproduce this. Any updates here? |
I was not able to narrow down or properly reproduce, I'll retry on more recent versions. |
I see where this is coming from. It is fixable but it might take while, time to propagate the API changes while keeping backward compatibility. One way to force So reasons related to efficiency and scheduling in cluster the environment of a Kernel is not recomputed on simple restart. |
This allow to update the running env of kernels. This will allow resolves some inconsistencies between kernel restart, and actually stopping and starting a kernel session. In parsley via a few lines in Jupyter Server in update_session, this will let us update the `__session__` which is supposed to reflect some information about the current session, and help correct ipython/ipykernel#1102 where renaming a notebook is not reflected in the kernel unless you manually stop/start the session, or restart the server.
This rely on jupyter/jupyter_client#987 and fixes ipython/ipykernel#1102 When a user rename the notebook in the UI, it will update the kernel env, so that the ``__session__`` variable reflect the new name on the next restart. It _does_ seem that each rename of a notebook in JupyterLab creates 4 update_session (2 with name, and 2 with path), but that does not seem to be a problem in this repository.
This allow to update the running env of kernels. This will allow resolves some inconsistencies between kernel restart, and actually stopping and starting a kernel session. In parsley via a few lines in Jupyter Server in update_session, this will let us update the `__session__` which is supposed to reflect some information about the current session, and help correct ipython/ipykernel#1102 where renaming a notebook is not reflected in the kernel unless you manually stop/start the session, or restart the server.
This now should be fixed if you have the latest Jupyter_client (8.6), and Jupyter_server (2.10) |
From https://github.com/Quansight/deshaw/issues/167#issuecomment-1420479621, about the
__session__
global variable,On renaming a notebook, the new name is reflected in
__session__
when the kernel is started by choosing the same kernel in Kernel -> Change Kernel or Switch Kernel menus. However, the new name is not picked up when kernel is restarted using any of the Kernel -> Restart Kernel ... options.Is this difference expected?
The text was updated successfully, but these errors were encountered: