Skip to content

Commit 447ef57

Browse files
jhlegarretaeffigies
authored andcommitted
RF: Fix for abc library Traversable class module
Fix for `abc` library `Traversable` class module: import from `importlib.resources.abc`. Fixes: ``` /home/runner/work/nibabel/nibabel/nibabel/testing/__init__.py:30: DeprecationWarning: 'importlib.abc.Traversable' is deprecated and slated for removal in Python 3.14 from importlib.abc import Traversable ``` raised for example at: https://github.com/nipy/nibabel/actions/runs/9637811213/job/26577586721#step:7:157 Documentation: https://docs.python.org/3/library/importlib.resources.abc.html#importlib.resources.abc.Traversable
1 parent adedf7b commit 447ef57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/testing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
from .np_features import memmap_after_ufunc
2828

2929
try:
30-
from importlib.abc import Traversable
3130
from importlib.resources import as_file, files
31+
from importlib.resources.abc import Traversable
3232
except ImportError: # PY38
3333
from importlib_resources import as_file, files
3434
from importlib_resources.abc import Traversable

0 commit comments

Comments
 (0)