Skip to content
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

Allow to update kernels env in between restart. #987

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Oct 23, 2023

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 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.
Carreau added a commit to Carreau/jupyter_server that referenced this pull request Oct 23, 2023
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.
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@blink1073 blink1073 merged commit 49dbf0f into jupyter:main Oct 23, 2023
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants