From 1c2a88fe809cba1edb6b3b1ccac6f90b1406dc36 Mon Sep 17 00:00:00 2001 From: Urs Baumann Date: Mon, 26 Aug 2024 18:05:06 +0200 Subject: [PATCH] Replace pkg_resources with importlib.metadata (#971) pkg_resources is deprecated in Python 3.12 --- nornir/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nornir/__init__.py b/nornir/__init__.py index a7cf47286..bd498c3f7 100644 --- a/nornir/__init__.py +++ b/nornir/__init__.py @@ -1,7 +1,7 @@ -import pkg_resources +from importlib.metadata import version from nornir.init_nornir import InitNornir -__version__ = pkg_resources.get_distribution("nornir").version +__version__ = version("nornir") __all__ = ("InitNornir", "__version__")