From 3a6777a9f0a8e38e6fb06e77b63a6644bec0e899 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 10 Aug 2024 18:11:54 +0200 Subject: [PATCH] Fix DeprecationWarning 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead --- numcodecs/tests/test_entrypoints_backport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numcodecs/tests/test_entrypoints_backport.py b/numcodecs/tests/test_entrypoints_backport.py index 5c69fd81..21f245aa 100644 --- a/numcodecs/tests/test_entrypoints_backport.py +++ b/numcodecs/tests/test_entrypoints_backport.py @@ -1,5 +1,5 @@ +import importlib import os.path -import pkgutil import sys from multiprocessing import Process @@ -7,7 +7,7 @@ import numcodecs.registry -if not pkgutil.find_loader("importlib_metadata"): # pragma: no cover +if not importlib.util.find_spec("importlib_metadata").loader: # pragma: no cover pytest.skip( "This test module requires importlib_metadata to be installed", allow_module_level=True,