Skip to content

Commit 3e92351

Browse files
committed
feat(version): migrated deprecated pkg_resources to importlib.metadata
Importlib is new stadnard for python>=3.7
1 parent 0330f6c commit 3e92351

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/jsonconversion/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
# Franz Steinmetz <[email protected]>
1010

1111
import sys
12-
from pkg_resources import get_distribution, DistributionNotFound
12+
from importlib.metadata import version, PackageNotFoundError
1313

1414
try:
15-
__version__ = get_distribution("jsonconversion").version
16-
except DistributionNotFound:
15+
__version__ = version("jsonconversion")
16+
except PackageNotFoundError:
1717
__version__ = "unknown"
1818

1919
try:

0 commit comments

Comments
 (0)