From 90e4487bc11b1273fe631b6d9ec714c4c5df2bdc Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 11 Sep 2024 09:01:53 -0400 Subject: [PATCH 1/6] Deprecate plugins --- dash/dash.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dash/dash.py b/dash/dash.py index 52a35fa35e..d8a19c8b45 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -557,6 +557,12 @@ def __init__( # pylint: disable=too-many-statements if plugins is not None and isinstance( plugins, patch_collections_abc("Iterable") ): + warnings.warn( + DeprecationWarning( + "plugins will be removed from Dash init in dash 3.0 and will be replaced by" + " a new system." + ) + ) for plugin in plugins: plugin.plug(self) From 9d1e41782a191b83cbc44cfd8994b9906b3efc7b Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 11 Sep 2024 09:17:12 -0400 Subject: [PATCH 2/6] Deprecate keyword --- dash/dash.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dash/dash.py b/dash/dash.py index d8a19c8b45..87a9bf80ce 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -547,6 +547,13 @@ def __init__( # pylint: disable=too-many-statements self._assets_files = [] self._long_callback_count = 0 + if long_callback_manager: + warnings.warn( + DeprecationWarning( + "`long_callback_manager` is deprecated and will be remove in dash 3.0, " + "use `background_callback_manager` instead." + ) + ) self._background_manager = background_callback_manager or long_callback_manager self.logger = logging.getLogger(__name__) From e299de9dd14605a93db93d13b639d5f69faaf939 Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 11 Sep 2024 09:49:55 -0400 Subject: [PATCH 3/6] Better wording of plugins deprecation. --- dash/dash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dash/dash.py b/dash/dash.py index 87a9bf80ce..e0bce04a67 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -566,8 +566,8 @@ def __init__( # pylint: disable=too-many-statements ): warnings.warn( DeprecationWarning( - "plugins will be removed from Dash init in dash 3.0 and will be replaced by" - " a new system." + "The `plugins` keyword will be removed from Dash init in Dash 3.0 " + "and replaced by a new hook system." ) ) for plugin in plugins: From 83fe598bcff8ec05917b68e49553009950a46594 Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 11 Sep 2024 10:03:55 -0400 Subject: [PATCH 4/6] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1030ae9ada..b870ebfc18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#2985](https://github.com/plotly/dash/pull/2985) Deprecate dynamic component loader. - [#2985](https://github.com/plotly/dash/pull/2985) Deprecate `run_server`, use `run` instead. - [#2899](https://github.com/plotly/dash/pull/2899) Deprecate `dcc.LogoutButton`, can be replaced with a `html.Button` or `html.A`. eg: `html.A(href=os.getenv('DASH_LOGOUT_URL'))` on a Dash Enterprise instance. +- [#2995](https://github.com/plotly/dash/pull/2995) Deprecate `Dash.__init__` keywords: + - The `plugins` keyword will be removed. + - Old `long_callback_manager` keyword will be removed, can use `background_callback_manager` instead. ## [2.18.0] - 2024-09-04 From a7e3cdddf9d13e61a1041b40202cc3ba85681b3d Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 11 Sep 2024 10:35:24 -0400 Subject: [PATCH 5/6] build From e5e3e3cfbc749962edc687bc43ead057921a6ff7 Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 12 Sep 2024 10:23:37 -0400 Subject: [PATCH 6/6] dash-Dash --- dash/dash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/dash.py b/dash/dash.py index e0bce04a67..0c08abe64c 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -550,7 +550,7 @@ def __init__( # pylint: disable=too-many-statements if long_callback_manager: warnings.warn( DeprecationWarning( - "`long_callback_manager` is deprecated and will be remove in dash 3.0, " + "`long_callback_manager` is deprecated and will be remove in Dash 3.0, " "use `background_callback_manager` instead." ) )