From ec49265b8f0f29a75aa1e0b4357b423f83303716 Mon Sep 17 00:00:00 2001 From: Mirochill <200482516+Mirochill@users.noreply.github.com> Date: Sun, 24 May 2026 13:40:43 +0200 Subject: [PATCH] Avoid pkg_resources for package version --- src/unitpy/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unitpy/__init__.py b/src/unitpy/__init__.py index 00f017d..a8a1376 100644 --- a/src/unitpy/__init__.py +++ b/src/unitpy/__init__.py @@ -1,4 +1,4 @@ -import pkg_resources +from importlib.metadata import version from unitpy.config import CONFIG import unitpy.errors as errors @@ -12,4 +12,4 @@ __all__ = ("Unit", "Quantity", "U", "Q") # single-sourcing the package version -__version__ = pkg_resources.require("unitpy")[0].version +__version__ = version("unitpy")