From 0a6d5ddb5cddb2d4b320a2781d6f24cd485ca1a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Tue, 3 Sep 2024 10:18:31 +0200 Subject: [PATCH] Misc updates --- panel/__init__.py | 4 +--- panel/compiler.py | 15 +-------------- panel/pane/base.py | 5 ++++- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/panel/__init__.py b/panel/__init__.py index e11d0387c0..1fd0e741a4 100644 --- a/panel/__init__.py +++ b/panel/__init__.py @@ -104,7 +104,7 @@ "links": "panel.links", "pane": "panel.pane", "panel": "panel.pane:panel", - "param": None, # available in panel/param.py + "param": "panel.param", "pipeline": "panel.pipeline", "reactive": "panel.reactive", "serve": "panel.io:serve", @@ -120,8 +120,6 @@ def __getattr__(name: str) -> object: if name == "no_lazy": for attr in _attrs: - if attr in ("param"): - continue mod = __getattr__(attr) if hasattr(mod, "_attrs"): getattr(mod._attrs, "no_lazy", None) diff --git a/panel/compiler.py b/panel/compiler.py index f14075e461..8ca7afbec5 100644 --- a/panel/compiler.py +++ b/panel/compiler.py @@ -13,13 +13,13 @@ from concurrent.futures import ThreadPoolExecutor from functools import cache, partial -from importlib import import_module import param import requests from bokeh.model import Model +from . import no_lazy # noqa: F401 from .config import config, panel_extension from .io.resources import RESOURCE_URLS from .reactive import ReactiveHTML @@ -54,19 +54,6 @@ def _download(url): response, error = None, e return response, error -def _walk_module(mod=None): - if mod is None: - mod = import_module("panel") - if not hasattr(mod, '_attrs'): - return - - for sub_name in mod._attrs: - submod = getattr(mod, sub_name) - if submod: - _walk_module(submod) - -_walk_module() - #--------------------------------------------------------------------- # Public API #--------------------------------------------------------------------- diff --git a/panel/pane/base.py b/panel/pane/base.py index 6870398d09..3a37df5ae2 100644 --- a/panel/pane/base.py +++ b/panel/pane/base.py @@ -249,7 +249,10 @@ def get_pane_type(cls, obj: Any, **kwargs) -> type['PaneBase']: return type(obj) descendents = [] - from . import no_lazy # noqa + # the following hvplot test fail if this is not imported + # test_interactive_pandas_series_plot_kind_attr + from .. import _interact # noqa: F401 + from . import no_lazy # noqa: F401 for p in param.concrete_descendents(PaneBase).values(): if p.priority is None: applies = True