E.g. matplotlib: ______________________________________________________________ test_savefig_backend ______________________________________________________________ name = '@absent', path = None, target = None > ??? E AttributeError: 'DynamicImporter' object has no attribute 'find_spec' <frozen importlib._bootstrap>:939: AttributeError During handling of the above exception, another exception occurred: def test_savefig_backend(): fig = plt.figure() # Intentionally use an invalid module name. with pytest.raises(ModuleNotFoundError, match="No module named '@absent'"): > fig.savefig("test", backend="module://@absent") build/test-lib/matplotlib/tests/test_figure.py:496: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build/test-lib/matplotlib/figure.py:3005: in savefig self.canvas.print_figure(fname, **kwargs) build/test-lib/matplotlib/backend_bases.py:2186: in print_figure canvas = self._get_output_canvas(backend, format) build/test-lib/matplotlib/backend_bases.py:2101: in _get_output_canvas importlib.import_module(cbook._backend_module_name(backend)) /usr/lib/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:1050: in _gcd_import ??? <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1002: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:941: in _find_spec ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ finder = <gi.importer.DynamicImporter object at 0x7f210d5ce1d0>, name = '@absent', path = None > ??? E ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module()
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e0d5facc35dc749b754408f5ec151a2d65be175 commit 8e0d5facc35dc749b754408f5ec151a2d65be175 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2021-06-20 16:15:01 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2021-06-20 16:31:45 +0000 dev-python/pygobject: Fix ImportWarnings with py3.10 Closes: https://bugs.gentoo.org/796929 Signed-off-by: Michał Górny <mgorny@gentoo.org> .../pygobject-3.40.1-dynamicimporter-py310.patch | 63 +++++++++++++++++ dev-python/pygobject/pygobject-3.40.1-r1.ebuild | 78 ++++++++++++++++++++++ 2 files changed, 141 insertions(+)