From 8f6bb930c17235f62cad887b5e86c660d45df788 Mon Sep 17 00:00:00 2001 From: Antonio Valentino Date: Fri, 13 Sep 2024 14:02:48 +0200 Subject: [PATCH] Fix compatibility with Python >= 3.12 --- docs/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 677b67f..d8d1fd9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -66,8 +66,10 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -import imp -resampy_version = imp.load_source('resampy.version', '../resampy/version.py') +import importlib.util +spec = importlib.util.spec_from_file_location('resampy.version', '../resampy/version.py') +resampy_version = importlib.util.module_from_spec(spec) +spec.loader.exec_module(resampy_version) # The short X.Y version. version = resampy_version.short_version