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,