From 180014356579e80cb9e7660cd8ba002626d51599 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Tue, 26 Sep 2023 16:08:58 -0400 Subject: [PATCH] remove pkg_resources --- chasten/util.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/chasten/util.py b/chasten/util.py index f35710fc..859cb42d 100644 --- a/chasten/util.py +++ b/chasten/util.py @@ -2,8 +2,6 @@ import importlib.metadata -import pkg_resources - from chasten import constants checkmark_unicode = "\u2713" @@ -42,17 +40,7 @@ def get_chasten_version() -> str: # there is not a working package that importlib.metadata can access with a version; # in this situation the function should return the default value of 0.0.0 except importlib.metadata.PackageNotFoundError: - try: - # if importlib.metadata fails, try using pkg_resources - # The 'distribution' variable holds information about the 'chasten' package - distribution = pkg_resources.get_distribution( - constants.chasten.Application_Name - ) - # Retrieve version information from distribution - version_string_of_foo = distribution.version - except pkg_resources.DistributionNotFound: - # If both methods fail, return a default version - version_string_of_foo = default_chasten_semver + version_string_of_foo = default_chasten_semver return version_string_of_foo