Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace pkg_resources for python3.12 #192

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cloudiscovery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

import gettext
import sys
from importlib import metadata
from os.path import dirname
from typing import List

import pkg_resources

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