From b0076d74ae3c008d53e85848cce8fc58ca47208c Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jan 2024 15:43:35 -0500 Subject: [PATCH] rm deprecated pkg_resources --- src/maggma/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/maggma/__init__.py b/src/maggma/__init__.py index 6e44ae29b..58708dbb9 100644 --- a/src/maggma/__init__.py +++ b/src/maggma/__init__.py @@ -1,8 +1,8 @@ """ Primary Maggma module """ -from pkg_resources import DistributionNotFound, get_distribution +from importlib.metadata import version, PackageNotFoundError try: - __version__ = get_distribution(__name__).version -except DistributionNotFound: # pragma: no cover + __version__ = version('maggma') +except PackageNotFoundError: # pragma: no cover # package is not installed pass