Skip to content

Debug in same module #1288

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

Merged
merged 5 commits into from
Jun 2, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- [#1249](https://github.com/plotly/dash/pull/1249) Fixes [#919](https://github.com/plotly/dash/issues/919) so `dash.testing` is compatible with more `pytest` plugins, particularly `pytest-flake8` and `pytest-black`.
- [#1248](https://github.com/plotly/dash/pull/1248) Fixes [#1245](https://github.com/plotly/dash/issues/1245), so you can use prop persistence with components that have dict IDs, ie for pattern-matching callbacks.
- [#1185](https://github.com/plotly/dash/pull/1185) Sort asset directories, same as we sort files inside those directories. This way if you need your assets loaded in a certain order, you can add prefixes to subdirectory names and enforce that order.
- [#1288](https://github.com/plotly/dash/pull/1288) Closes [#1285](https://github.com/plotly/dash/issues/1285): Debug=True should work in the __main__ module.

## [1.12.0] - 2020-05-05
### Added
Expand Down
13 changes: 9 additions & 4 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,14 +1338,19 @@ def enable_dev_tools(
_reload = self._hot_reload
_reload.hash = generate_hash()

# find_loader should return None on __main__ but doesn't
# on some python versions https://bugs.python.org/issue14710
packages = [
pkgutil.find_loader(x)
for x in list(ComponentRegistry.registry) + ["dash_renderer"]
if x != "__main__"
]

component_packages_dist = [
os.path.dirname(package.path)
if hasattr(package, "path")
else package.filename
for package in (
pkgutil.find_loader(x)
for x in list(ComponentRegistry.registry) + ["dash_renderer"]
)
for package in packages
]

_reload.watch_thread = threading.Thread(
Expand Down