Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8934285

Browse filesBrowse files
committed
Update __init__.py
1 parent 92ce5bc commit 8934285
Copy full SHA for 8934285

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎packages/python/plotly/codegen/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/codegen/__init__.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ def perform_codegen():
270270
if sys.version_info < (3, 7) or TYPE_CHECKING:
271271
try:
272272
import ipywidgets as _ipywidgets
273-
from distutils.version import LooseVersion as _LooseVersion
274-
if _LooseVersion(_ipywidgets.__version__) >= _LooseVersion("7.0.0"):
273+
from packaging.version import Version as _Version
274+
if _Version(_ipywidgets.__version__) >= _Version("7.0.0"):
275275
from ..graph_objs._figurewidget import FigureWidget
276276
else:
277277
raise ImportError()
@@ -284,9 +284,9 @@ def __getattr__(import_name):
284284
if import_name == "FigureWidget":
285285
try:
286286
import ipywidgets
287-
from distutils.version import LooseVersion
287+
from packaging.version import Version
288288
289-
if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"):
289+
if Version(ipywidgets.__version__) >= Version("7.0.0"):
290290
from ..graph_objs._figurewidget import FigureWidget
291291
292292
return FigureWidget

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.