diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 42ad62dd83..fed16fa424 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -2,6 +2,10 @@ name: Dash Testing on: push: + branches: + - dev + - master + pull_request: workflow_dispatch: jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md index 866d301f8b..be1b24fdb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## Fixed - [#3279](https://github.com/plotly/dash/pull/3279) Fix an issue where persisted values were incorrectly pruned when updated via callback. Now, callback returned values are correctly stored in the persistence storage. Fix [#2678](https://github.com/plotly/dash/issues/2678) - [#3298](https://github.com/plotly/dash/pull/3298) Fix dev_only resources filtering. +- [#3315](https://github.com/plotly/dash/pull/3315) Fix pages module is package check. ## Added - [#3294](https://github.com/plotly/dash/pull/3294) Added the ability to pass `allow_optional` to Input and State to allow callbacks to work even if these components are not in the dash layout. diff --git a/dash/_pages.py b/dash/_pages.py index e21aab86e2..ce8f1d1064 100644 --- a/dash/_pages.py +++ b/dash/_pages.py @@ -86,12 +86,10 @@ def _infer_path(module_name, template): def _module_name_is_package(module_name): - file_path = sys.modules[module_name].__file__ - return ( - file_path - and module_name in sys.modules - and Path(file_path).name == "__init__.py" - ) + if module_name not in sys.modules: + return False + file = sys.modules[module_name].__file__ + return file and file.endswith("__init__.py") def _path_to_module_name(path):