Skip to content

Commit 43351ff

Browse files
kavanasetschaume
andauthored
Fix python = 3.12 incompatibility (#120)
* Update __init__.py * Update __init__.py * Linting update --------- Co-authored-by: Patrick Huck <[email protected]>
1 parent b56cf53 commit 43351ff

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/pyrho/__init__.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
__author__ = """Jimmy Shen"""
44
__email__ = "[email protected]"
55

6-
7-
from pkg_resources import DistributionNotFound, get_distribution
6+
from importlib.metadata import PackageNotFoundError, version
87

98
try:
10-
__version__ = get_distribution(__name__).version
11-
except DistributionNotFound:
12-
pass
9+
__version__ = version(__name__)
10+
except PackageNotFoundError:
11+
__version__ = "unknown"

0 commit comments

Comments
 (0)