Skip to content

Commit

Permalink
Deprecate ReactTemplate, IDOM pane and Viewable.app (#4293)
Browse files Browse the repository at this point in the history
* Deprecate VanillaTemplate, ReactTemplate, IDOM pane and Viewable.app

* Back out of VanillaTemplate deprecation
  • Loading branch information
philippjfr committed Jan 25, 2023
1 parent 2469b2a commit 3f1ee7e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions panel/pane/idom.py
Expand Up @@ -15,6 +15,7 @@
from ..io.resources import DIST_DIR, LOCAL_DIST
from ..io.state import state
from ..models import IDOM as _BkIDOM
from ..util.warnings import deprecated
from .base import PaneBase

if TYPE_CHECKING:
Expand Down Expand Up @@ -73,6 +74,8 @@ def __init__(self, object=None, **params):
raise RuntimeError(
f"Expected idom>={_IDOM_MIN_VER},<{_IDOM_MAX_VER}, but found {idom_version}"
)
else:
deprecated('1.0', 'panel.pane.IDOM', extra='It may be reimplemented as a separate package in future.')
super().__init__(object, **params)
self._idom_loop = None
self._idom_model = {}
Expand Down
2 changes: 2 additions & 0 deletions panel/template/react/__init__.py
Expand Up @@ -9,6 +9,7 @@
from ...depends import depends
from ...io.resources import CSS_URLS
from ...layout import Card, GridSpec
from ...util.warnings import deprecated
from ..base import BasicTemplate
from ..theme import DarkTheme, DefaultTheme

Expand Down Expand Up @@ -64,6 +65,7 @@ class ReactTemplate(BasicTemplate):
}

def __init__(self, **params):
deprecated('1.0', 'panel.template.ReactTemplate', 'panel.template.FastGridTemplate')
if 'main' not in params:
params['main'] = GridSpec(ncols=12, mode='override')
super().__init__(**params)
Expand Down
2 changes: 2 additions & 0 deletions panel/viewable.py
Expand Up @@ -43,6 +43,7 @@
from .io.save import save
from .io.state import curdoc_locked, state
from .util import escape, param_reprs
from .util.warnings import deprecated

if TYPE_CHECKING:
from bokeh.model import Model
Expand Down Expand Up @@ -751,6 +752,7 @@ def app(self, notebook_url: str = "localhost:8888", port: int = 0) -> 'Server':
port: int (optional, default=0)
Allows specifying a specific port
"""
deprecated("1.0", "Viewable.app", "panel.io.notebook.show_server")
return show_server(self, notebook_url, port)

def embed(
Expand Down

0 comments on commit 3f1ee7e

Please sign in to comment.