From 135a358c92a668132952e4e3d95c4737d741379e Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Tue, 10 Oct 2023 15:25:01 +0200 Subject: [PATCH] Use importlib.metadata instead of pkg_resources --- audplot/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audplot/__init__.py b/audplot/__init__.py index 6f0d589..79cfe53 100644 --- a/audplot/__init__.py +++ b/audplot/__init__.py @@ -18,9 +18,9 @@ # Dynamically get the version of the installed module try: - import pkg_resources - __version__ = pkg_resources.get_distribution(__name__).version + import importlib.metadata + __version__ = importlib.metadata.version(__name__) except Exception: # pragma: no cover - pkg_resources = None # pragma: no cover + importlib = None # pragma: no cover finally: - del pkg_resources + del importlib