Bug 2424591

Summary: python-exdir fails to build with Python 3.15: TypeError: 'module'/'Plugin' object is not iterable
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-exdirAssignee: Ankur Sinha (FranciscoD) <sanjay.ankur>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, mhroncok, neuro-sig, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434    

Description Karolina Surma 2025-12-23 13:37:21 UTC
python-exdir fails to build with Python 3.15.0a3.


______________________ test_fail_reading_without_required ______________________

setup_teardown_folder = (PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_fail_reading_without_requ0'), PosixPath('/tmp/pytest-of-mockbuild/p...g_without_requ0/test.exdir'), PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_fail_reading_without_requ0/exdir_dir'))

    def test_fail_reading_without_required(setup_teardown_folder):
        class DatasetPlugin(exdir.plugin_interface.Dataset):
            def prepare_read(self, dataset_data):
                return dataset_data
    
            def prepare_write(self, dataset_data):
                if "plugins" not in dataset_data.meta:
                    dataset_data.meta["plugins"] = {}
                if "required" not in dataset_data.meta["plugins"]:
                    dataset_data.meta["plugins"]["required"] = {"required": True}
                return dataset_data
    
        required = exdir.plugin_interface.Plugin(
            "required",
            dataset_plugins=[DatasetPlugin()]
        )
    
>       f = exdir.File(setup_teardown_folder[1], 'w', plugins=required)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_plugins.py:115: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../BUILDROOT/usr/lib/python3.15/site-packages/exdir/core/exdir_file.py:85: in __init__
    self.plugin_manager = exdir.plugin_interface.plugin_interface.Manager(plugins)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <exdir.plugin_interface.plugin_interface.Manager object at 0x7f802a4fbdd0>
plugins = <exdir.plugin_interface.plugin_interface.Plugin object at 0x7f802a79df40>

    def __init__(self, plugins):
    
        file_plugins = []
        group_plugins = []
        dataset_plugins = []
        attribute_plugins = []
        raw_plugins = []
    
        if plugins is None:
            plugins = []
    
        # make iterable if not already so
        try:
            _ = (e for e in plugins)
        except TypeError:
            plugins = [plugins]
    
        self.plugins = []
>       for plugin in plugins:
                      ^^^^^^^
E       TypeError: 'Plugin' object is not iterable

../BUILDROOT/usr/lib/python3.15/site-packages/exdir/plugin_interface/plugin_interface.py:289: TypeError
_________________________ test_create_quantities_file __________________________

setup_teardown_folder = (PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_quantities_file0'), PosixPath('/tmp/pytest-of-mockbuild/pyte...e_quantities_file0/test.exdir'), PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_quantities_file0/exdir_dir'))

    def test_create_quantities_file(setup_teardown_folder):
>       f = exdir.File(setup_teardown_folder[1], 'w', plugins=exdir.plugins.quantities)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_quantities.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../BUILDROOT/usr/lib/python3.15/site-packages/exdir/core/exdir_file.py:85: in __init__
    self.plugin_manager = exdir.plugin_interface.plugin_interface.Manager(plugins)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <exdir.plugin_interface.plugin_interface.Manager object at 0x7f802a4f9550>
plugins = <module 'exdir.plugins.quantities' from '/builddir/build/BUILD/python-exdir-0.5.0.1-build/BUILDROOT/usr/lib/python3.15/site-packages/exdir/plugins/quantities.py'>

    def __init__(self, plugins):
    
        file_plugins = []
        group_plugins = []
        dataset_plugins = []
        attribute_plugins = []
        raw_plugins = []
    
        if plugins is None:
            plugins = []
    
        # make iterable if not already so
        try:
            _ = (e for e in plugins)
        except TypeError:
            plugins = [plugins]
    
        self.plugins = []
>       for plugin in plugins:
                      ^^^^^^^
E       TypeError: 'module' object is not iterable



https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/09935325-python-exdir/

For all our attempts to build python-exdir with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-exdir/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.