From e0b66592e836e1bd06e9aee29089b2d76d5e571a Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Mon, 9 Oct 2023 14:45:11 +0200 Subject: [PATCH] Use importlib.metadata instead of pkg_resources --- audb/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audb/__init__.py b/audb/__init__.py index a684c9da..3893f447 100644 --- a/audb/__init__.py +++ b/audb/__init__.py @@ -26,9 +26,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