Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 8ba05ba

Browse files
committed
Don't let user import dash_html_components if dash not >=0.22.0
1 parent 29e2d73 commit 8ba05ba

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

dash_html_components/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@
1010

1111
# Module imports trigger a dash.development import, need to check this first
1212
if not hasattr(_dash, 'development'):
13-
print("Dash was not successfully imported. Make sure you don't have a file "
14-
"named \n'dash.py' in your current directory.", file=_sys.stderr)
13+
print(
14+
"Dash was not successfully imported. Make sure you don't have a file "
15+
"named \n'dash.py' in your current directory.", file=_sys.stderr)
16+
_sys.exit(1)
17+
18+
# Must update to dash>=0.22.0 to use this version of dash-html-components
19+
if not hasattr(_dash.development.base_component, '_explicitize_args'):
20+
print("Please update the `dash` module to >= 0.22.0 to use this "
21+
"version of dash_html_components.\n"
22+
"You are using version {:s}".format(_dash.version.__version__),
23+
file=_sys.stderr)
1524
_sys.exit(1)
1625

1726

dash_html_components/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.11.0'
1+
__version__ = '0.12.0'

0 commit comments

Comments
 (0)