pydicom/pynetdicom

importlib.abc.Finder has been removed from Python 3.12

alcir opened this issue · 2 comments

alcir commented

_ModuleHiderBase = getattr(importlib.abc, "MetaPathFinder", importlib.abc.Finder)

Running tests with Python 3.12 this is the result

_____________________________________________________________________________________________ ERROR collecting pynetdicom/tests/test_assoc.py _______________________________________________________________________________________________
pynetdicom/tests/test_assoc.py:69: in <module>
    from .hide_modules import hide_modules
pynetdicom/tests/hide_modules.py:33: in <module>
    _ModuleHiderBase = getattr(importlib.abc, "MetaPathFinder", importlib.abc.Finder)
/usr/lib64/python3.12/importlib/abc.py:38: in __getattr__
    raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
E   AttributeError: module 'importlib.abc' has no attribute 'Finder'

I think that it is related to this change python/cpython/issues/98040

Thanks - yes, I think this had been deprecated before. Python 3.12 is not yet supported in pydicom/pynetdicom, but this is certainly something that can already be adapted. Are you going to make a PR for this yourself?

Closing as fixed.