From 5ee78667aa933a067f1f4a6f460e45e1c43add1f Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Thu, 5 Sep 2024 16:25:47 +0200 Subject: [PATCH] Use importlib instead of pkg_resources --- audpsychometric/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audpsychometric/__init__.py b/audpsychometric/__init__.py index 69c4361..10d16b0 100644 --- a/audpsychometric/__init__.py +++ b/audpsychometric/__init__.py @@ -15,10 +15,10 @@ # Dynamically get the version of the installed module try: - import pkg_resources + import importlib.metadata - __version__ = pkg_resources.get_distribution(__name__).version + __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