From bbda694aa2f22136dc47297e8822628e496b228d Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Wed, 9 Dec 2020 20:54:22 -0500 Subject: [PATCH 1/2] improve dash import test see https://github.com/plotly/dash/issues/1143 --- dash_core_components_base/__init__.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dash_core_components_base/__init__.py b/dash_core_components_base/__init__.py index a16ba8ac9..a236a451c 100644 --- a/dash_core_components_base/__init__.py +++ b/dash_core_components_base/__init__.py @@ -14,19 +14,11 @@ __version__ = package['version'] # Module imports trigger a dash.development import, need to check this first -if not hasattr(_dash, 'development'): +if not hasattr(_dash, '__plotly_dash') and not hasattr(_dash, 'development'): print("Dash was not successfully imported. Make sure you don't have a file " "named \n'dash.py' in your current directory.", file=_sys.stderr) _sys.exit(1) -# Must update to dash>=0.23.1 to use this version of dash-core-components -if not hasattr(_dash.development.base_component, '_explicitize_args'): - print("Please update the `dash` module to >= 0.23.1 to use this " - "version of dash_core_components.\n" - "You are using version {:s}".format(_dash.version.__version__), - file=_sys.stderr) - _sys.exit(1) - from ._imports_ import * # noqa: F401, F403 from ._imports_ import __all__ # noqa: E402 From bc7eef853fe91fed13df0bd39835dbf89a086bf0 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Wed, 9 Dec 2020 23:20:24 -0500 Subject: [PATCH 2/2] changelog for import bug fix --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8671b0626..223db20f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [UNRELEASED] +### Fixed +- [#903](https://github.com/plotly/dash-core-components/pull/903) - part of fixing dash import bug https://github.com/plotly/dash/issues/1143 + ## [1.14.1] - 2020-12-09 ### Updated - [#898](https://github.com/plotly/dash-core-components/pull/898)