From 8e62c0b1c1eb963f2676a8546cf51d8bf3aaeccd Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Thu, 28 Nov 2024 15:34:42 +0100 Subject: [PATCH] Replace pkg_resources with importlib.metadata Avoids DeprecationWarning in ckanapi.version. --- ckanapi/version.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ckanapi/version.py b/ckanapi/version.py index d9a46f5..e9caae4 100644 --- a/ckanapi/version.py +++ b/ckanapi/version.py @@ -1,5 +1,3 @@ -import pkg_resources - -__version__ = pkg_resources.require("ckanapi")[0].version - +from importlib.metadata import version +__version__ = version("ckanapi")