Skip to content

Commit 6b8a0ce

Browse files
committed
Support Python 3.12
1 parent 2d14d57 commit 6b8a0ce

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

webviz_core_components/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys as _sys
55
import json
66

7-
from pkg_resources import get_distribution, DistributionNotFound
7+
from importlib.metadata import version
88

99
import dash as _dash
1010

@@ -21,9 +21,8 @@
2121
__all__ += wrapped_components
2222

2323
try:
24-
__version__ = get_distribution(__name__).version
25-
except DistributionNotFound:
26-
# package is not installed
24+
__version__ = version(__name__)
25+
except PackageNotFoundError, ModuleNotFoundError:
2726
pass
2827

2928
if not hasattr(_dash, "development"):

0 commit comments

Comments
 (0)