Skip to content

Commit 278af78

Browse files
authored
Merge pull request #2995 from plotly/deprecate-plugins
Deprecate plugins
2 parents 9323c28 + e5e3e3c commit 278af78

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1515
- [#2985](https://github.com/plotly/dash/pull/2985) Deprecate dynamic component loader.
1616
- [#2985](https://github.com/plotly/dash/pull/2985) Deprecate `run_server`, use `run` instead.
1717
- [#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.
18+
- [#2995](https://github.com/plotly/dash/pull/2995) Deprecate `Dash.__init__` keywords:
19+
- The `plugins` keyword will be removed.
20+
- Old `long_callback_manager` keyword will be removed, can use `background_callback_manager` instead.
1821

1922
## [2.18.0] - 2024-09-04
2023

dash/dash.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,13 @@ def __init__( # pylint: disable=too-many-statements
547547

548548
self._assets_files = []
549549
self._long_callback_count = 0
550+
if long_callback_manager:
551+
warnings.warn(
552+
DeprecationWarning(
553+
"`long_callback_manager` is deprecated and will be remove in Dash 3.0, "
554+
"use `background_callback_manager` instead."
555+
)
556+
)
550557
self._background_manager = background_callback_manager or long_callback_manager
551558

552559
self.logger = logging.getLogger(__name__)
@@ -557,6 +564,12 @@ def __init__( # pylint: disable=too-many-statements
557564
if plugins is not None and isinstance(
558565
plugins, patch_collections_abc("Iterable")
559566
):
567+
warnings.warn(
568+
DeprecationWarning(
569+
"The `plugins` keyword will be removed from Dash init in Dash 3.0 "
570+
"and replaced by a new hook system."
571+
)
572+
)
560573
for plugin in plugins:
561574
plugin.plug(self)
562575

0 commit comments

Comments
 (0)