From ed14ecdeb6384ca16605ccfc2a32645bf42a6190 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Wed, 15 Nov 2023 13:14:42 +0100 Subject: [PATCH 1/2] Only set HoloViews backend in first extension call --- panel/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/config.py b/panel/config.py index 34f34df8ee..835fa896fd 100644 --- a/panel/config.py +++ b/panel/config.py @@ -798,7 +798,7 @@ def __call__(self, *args, **params): backend = hv.Store.current_backend else: backend = 'bokeh' - if hasattr(hv.Store, 'set_current_backend'): + if not loaded and backend != hv.Store.current_backend and hasattr(hv.Store, 'set_current_backend'): hv.Store.set_current_backend(backend) else: hv.Store.current_backend = backend From 680bf5dc7d5a6c0b5777ddc3d3cdd8f077d6fd9d Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Fri, 12 Jan 2024 16:47:29 +0100 Subject: [PATCH 2/2] Small fix --- panel/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/config.py b/panel/config.py index 835fa896fd..a1909cbf3e 100644 --- a/panel/config.py +++ b/panel/config.py @@ -798,7 +798,7 @@ def __call__(self, *args, **params): backend = hv.Store.current_backend else: backend = 'bokeh' - if not loaded and backend != hv.Store.current_backend and hasattr(hv.Store, 'set_current_backend'): + if not loaded or (loaded and backend != hv.Store.current_backend) and hasattr(hv.Store, 'set_current_backend'): hv.Store.set_current_backend(backend) else: hv.Store.current_backend = backend