From 908953d6d33d99ec93616aae218576ad772ea9cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Wed, 26 Jun 2024 20:27:22 -0400 Subject: [PATCH] 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 --- nibabel/testing/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nibabel/testing/__init__.py b/nibabel/testing/__init__.py index d335c9a8c..9d2011237 100644 --- a/nibabel/testing/__init__.py +++ b/nibabel/testing/__init__.py @@ -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