Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate plugins #2995

Merged
merged 6 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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