Skip to content

[WIP] Make Dash Pages & packages play nice & experimenting with clearing Pages registry #2271

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Isolate state clearing to just the registry and add more comments
  • Loading branch information
ned2 committed Dec 11, 2022
commit 291947ee917b6e8a405bf07a25d0ace2d39ee499
8 changes: 7 additions & 1 deletion dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ def _get_skip(text, divider=2):
def init_dash_globals():
"""Ensure that all Dash global state is re-initialised."""
_pages.PAGE_REGISTRY.clear()
_pages.CONFIG.clear()

# this line of thinking could be extended to potentially clear the following:
# _pages.CONFIG
# _get_paths.CONFIG
# _callback.GLOBAL_CALLBACK_MAP
# _callback.GLOBAL_CALLBACK_LIST
# _callback.GLOBAL_INLINE_SCRIPTS


# pylint: disable=too-many-instance-attributes
Expand Down