Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796929 - dev-python/pygobject: DynamicLoader is not py3.10-compliant, breaking random packages
Summary: dev-python/pygobject: DynamicLoader is not py3.10-compliant, breaking random ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-20 15:15 UTC by Michał Górny
Modified: 2021-06-20 16:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-06-20 15:15:38 UTC
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()
Comment 1 Larry the Git Cow gentoo-dev 2021-06-20 16:31:49 UTC
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(+)