Skip to content

Commit

Permalink
Always use custom PanelKernel for ipywidgets (#1476)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Jul 10, 2020
1 parent a7019d6 commit 7d5d5de
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions panel/pane/ipywidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ def _get_ipywidget(self, obj, doc, root, comm, **kwargs):
IPyWidget = _BkIPyWidget
else:
import ipykernel
from ipywidgets_bokeh.kernel import BokehKernel
from ipywidgets_bokeh.widget import IPyWidget
if not isinstance(ipykernel.kernelbase.Kernel._instance, BokehKernel):
from ..io.ipywidget import PanelKernel
from ..io.ipywidget import PanelKernel
if not isinstance(ipykernel.kernelbase.Kernel._instance, PanelKernel):
kernel = PanelKernel(document=doc, key=str(id(doc)).encode('utf-8'))
for w in obj.widgets.values():
w.comm.kernel = kernel
Expand Down

0 comments on commit 7d5d5de

Please sign in to comment.