Skip to content

Commit

Permalink
RF: Fix for abc library Traversable class module
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jhlegarreta authored and effigies committed Jun 27, 2024
1 parent adedf7b commit 908953d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nibabel/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from .np_features import memmap_after_ufunc

try:
from importlib.abc import Traversable
from importlib.resources.abc import Traversable
from importlib.resources import as_file, files
except ImportError: # PY38
from importlib_resources import as_file, files
Expand Down

0 comments on commit 908953d

Please sign in to comment.