Skip to content

Commit 2bd85be

Browse files
Fix DeprecationWarning
'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead
1 parent b9a0039 commit 2bd85be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numcodecs/tests/test_entrypoints_backport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
import importlib
12
import os.path
2-
import pkgutil
33
import sys
44
from multiprocessing import Process
55

66
import pytest
77

88
import numcodecs.registry
99

10-
if not pkgutil.find_loader("importlib_metadata"): # pragma: no cover
10+
if not importlib.util.find_spec("importlib_metadata").loader: # pragma: no cover
1111
pytest.skip(
1212
"This test module requires importlib_metadata to be installed",
1313
allow_module_level=True,

0 commit comments

Comments
 (0)