Open jasongrout opened 3 years ago
When a session context changes a kernel, is
this._kernel
reset?
Does this question only apply to the KernelWidgetManager
?
The WidgetManager
(used for notebooks) seems to be handling a SessionContext
, which should handle kernel restarts.
So accessing this.kernel
should return the current kernel
for the session context:
In ipywidgets 7.x, we waited for the context to be ready in
_loadFromKernel
- is that still done in the refactor, or is it needed?
Looking at the code, _loadFromKernel
seems to be called from the WidgetManager
here:
And from KernelWidgetManager
here:
With _loadFromKernel
defined in the base LabWidgetManager
class:
In https://github.com/jupyter-widgets/ipywidgets/commit/9d999d7b267ade8037b821ce356868a3ce205bd8 (part of #2532), we introduced changes refactoring how kernels are used in the JupyterLab manager.
Looking over the code in https://github.com/jupyter-widgets/ipywidgets/blob/master/packages/jupyterlab-manager/src/manager.ts, I think it would be good to check a few things:
this._kernel
reset?_loadFromKernel
- is that still done in the refactor, or is it needed?