Skip to content

Commit

Permalink
Merge pull request #2995 from plotly/deprecate-plugins
Browse files Browse the repository at this point in the history
Deprecate plugins
  • Loading branch information
T4rk1n authored Sep 12, 2024
2 parents 9323c28 + e5e3e3c commit 278af78
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 13 additions & 0 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand All @@ -557,6 +564,12 @@ def __init__( # pylint: disable=too-many-statements
if plugins is not None and isinstance(
plugins, patch_collections_abc("Iterable")
):
warnings.warn(
DeprecationWarning(
"The `plugins` keyword will be removed from Dash init in Dash 3.0 "
"and replaced by a new hook system."
)
)
for plugin in plugins:
plugin.plug(self)

Expand Down

0 comments on commit 278af78

Please # to comment.