Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3.12: Fix AttributeError #853

Closed
wants to merge 1 commit into from
Closed

Conversation

penguinpee
Copy link

getattr(importlib.abc, "MetaPathFinder", importlib.abc.Finder)
throws AttributeError in Python3.12.

`getattr(importlib.abc, "MetaPathFinder", importlib.abc.Finder)`
throws AttributeError in Python3.12.
@penguinpee
Copy link
Author

Tests were failing when running with Python3.12:

==================================== ERRORS ====================================
_______________ 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'
_____________ ERROR collecting pynetdicom/tests/test_transport.py ______________
pynetdicom/tests/test_transport.py:34: 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'

@mrbean-bremen
Copy link
Member

Duplicate of #852?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants