Skip to content

Commit 526af0c

Browse files
authored
Merge pull request #1288 from dannysepler/same-module
Debug in same module
2 parents c3b4046 + c801be3 commit 526af0c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1414
- [#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`.
1515
- [#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.
1616
- [#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.
17+
- [#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.
1718

1819
## [1.12.0] - 2020-05-05
1920
### Added

dash/dash.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -1338,14 +1338,19 @@ def enable_dev_tools(
13381338
_reload = self._hot_reload
13391339
_reload.hash = generate_hash()
13401340

1341+
# find_loader should return None on __main__ but doesn't
1342+
# on some python versions https://bugs.python.org/issue14710
1343+
packages = [
1344+
pkgutil.find_loader(x)
1345+
for x in list(ComponentRegistry.registry) + ["dash_renderer"]
1346+
if x != "__main__"
1347+
]
1348+
13411349
component_packages_dist = [
13421350
os.path.dirname(package.path)
13431351
if hasattr(package, "path")
13441352
else package.filename
1345-
for package in (
1346-
pkgutil.find_loader(x)
1347-
for x in list(ComponentRegistry.registry) + ["dash_renderer"]
1348-
)
1353+
for package in packages
13491354
]
13501355

13511356
_reload.watch_thread = threading.Thread(

0 commit comments

Comments
 (0)