From 7e033857bacb1681427377d551890e96de988b48 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Fri, 10 Jun 2022 16:18:58 -0700 Subject: [PATCH] Replace pkg_resources with importlib.metadata --- comictaggerlib/main.py | 7 +++---- comictaggerlib/ui/settingswindow.ui | 14 +++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/comictaggerlib/main.py b/comictaggerlib/main.py index 35d8f5a..517e1b7 100755 --- a/comictaggerlib/main.py +++ b/comictaggerlib/main.py @@ -15,6 +15,7 @@ # limitations under the License. from __future__ import annotations +import importlib.metadata import json import logging.handlers import os @@ -25,8 +26,6 @@ import sys import traceback import types -import pkg_resources - from comicapi import utils from comictaggerlib import cli from comictaggerlib.comicvinetalker import ComicVineTalker @@ -155,8 +154,8 @@ def ctmain() -> None: ) logger.debug("Installed Packages") - for pkg in sorted(pkg_resources.working_set, key=lambda x: x.project_name): - logger.debug("%s\t%s", pkg.project_name, pkg.version) + for pkg in sorted(importlib.metadata.distributions(), key=lambda x: x.name): + logger.debug("%s\t%s", pkg.name, pkg.version) utils.load_publishers() update_publishers() diff --git a/comictaggerlib/ui/settingswindow.ui b/comictaggerlib/ui/settingswindow.ui index 6f5f03b..2f61133 100644 --- a/comictaggerlib/ui/settingswindow.ui +++ b/comictaggerlib/ui/settingswindow.ui @@ -30,7 +30,7 @@ 0 - + General @@ -131,7 +131,7 @@ - + Searching @@ -225,7 +225,7 @@ - + Filename Parser @@ -279,7 +279,7 @@ - + Comic Vine @@ -471,7 +471,7 @@ - + CBL @@ -582,7 +582,7 @@ - + Rename @@ -700,7 +700,7 @@ By default only removes restricted characters and filenames for the current Oper - + RAR Tools