Skip to content

Commit 12aa6e9

Browse files
committed
replace pkg_resources for python3.12
1 parent fad132e commit 12aa6e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cloudiscovery/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from os.path import dirname
2020
from typing import List
2121

22-
import pkg_resources
22+
from importlib import metadata
2323

2424
"""path to pip package"""
2525
sys.path.append(dirname(__file__))
@@ -100,7 +100,7 @@ def main():
100100
def check_diagram_version(diagram):
101101
if diagram:
102102
# Checking diagram version. Must be 0.13 or higher
103-
if pkg_resources.get_distribution("diagrams").version < "0.14":
103+
if metadata.version("diagrams") < "0.14":
104104
exit_critical(
105105
"You must update diagrams package to 0.14 or higher. "
106106
"- See on https://github.com/mingrammer/diagrams"

0 commit comments

Comments
 (0)