From 03e62cb23999aae6c7082918a03390030ce7db5d Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 28 Jun 2023 14:39:58 -0400 Subject: [PATCH 1/3] Add warning if using JupyterDash --- dash/dash.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dash/dash.py b/dash/dash.py index e3415e6294..d6966147d0 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -3,6 +3,7 @@ import sys import collections import importlib +import warnings from contextvars import copy_context from importlib.machinery import ModuleSpec import pkgutil @@ -511,6 +512,9 @@ def __init__( # pylint: disable=too-many-statements self.logger.setLevel(logging.INFO) + if self.__class__.__name__ == "JupyterDash": + warnings.warn("JupyterDash is deprecated, use Dash instead.") + def init_app(self, app=None, **kwargs): """Initialize the parts of Dash that require a flask app.""" From a959be15539ee75df58e7fbd8f8a74bf4b2bb1c8 Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 28 Jun 2023 14:42:40 -0400 Subject: [PATCH 2/3] Update changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b02812726e..582839611c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## Changed - [#2573](https://github.com/plotly/dash/pull/2573) Use `julia --project` command inside `JuliaRunner`. +- [#2579](https://github.com/plotly/dash/pull/2579) Add warning if using `JupyterDash` ## [2.11.0] - 2023-06-23 From 2fec4b45097fe5c797fdbbdc27e4bb527094759e Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 29 Jun 2023 11:23:22 -0400 Subject: [PATCH 3/3] Add link to dash-in-jupyter in the warning. --- dash/dash.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dash/dash.py b/dash/dash.py index d6966147d0..64b2a1ea02 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -513,7 +513,10 @@ def __init__( # pylint: disable=too-many-statements self.logger.setLevel(logging.INFO) if self.__class__.__name__ == "JupyterDash": - warnings.warn("JupyterDash is deprecated, use Dash instead.") + warnings.warn( + "JupyterDash is deprecated, use Dash instead.\n" + "See https://dash.plotly.com/dash-in-jupyter for more details." + ) def init_app(self, app=None, **kwargs): """Initialize the parts of Dash that require a flask app."""