Skip to content

Commit

Permalink
Merge pull request #1288 from dannysepler/same-module
Browse files Browse the repository at this point in the history
Debug in same module
  • Loading branch information
alexcjohnson authored Jun 2, 2020
2 parents c3b4046 + c801be3 commit 526af0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
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

0 comments on commit 526af0c

Please sign in to comment.