From d4e903d4b9c2aca3e6ebb55a65757111d81f42c9 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Thu, 26 Feb 2026 13:57:39 +0100 Subject: [PATCH] Replace pkg_resources with importlib `pkg_resources` has been removed and can be replaced with `importlib` (present since python 3.8) --- docs/source/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2e993cb..e53ae60 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,8 +1,8 @@ -from pkg_resources import DistributionNotFound, get_distribution +from importlib.metadata import PackageNotFoundError, version try: - __version__ = get_distribution("pspy").version -except DistributionNotFound: + __version__ = version("pspy") +except PackageNotFoundError: __version__ = "unknown version" import os