From 3156907fb9abe3a74e7e2d5cb321c5c8aac2b965 Mon Sep 17 00:00:00 2001 From: Aleksander Mats Karlsson Date: Tue, 25 Apr 2023 08:40:17 +0200 Subject: [PATCH] Remove deprecated usage of pkg_resources --- src/ecl_data_io/version.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ecl_data_io/version.py b/src/ecl_data_io/version.py index 9c190a5..8c68220 100644 --- a/src/ecl_data_io/version.py +++ b/src/ecl_data_io/version.py @@ -1,6 +1,6 @@ -from pkg_resources import DistributionNotFound, get_distribution +from importlib.metadata import version, PackageNotFoundError try: - version = get_distribution(__name__).version -except DistributionNotFound: + version = version("ecl-data-io") +except PackageNotFoundError: version = "0.0.0"