Skip to content

AttributeError: module 'pkgutil' has no attribute 'get_loader' on Python 3.14 #486

Description

@aijanai

pkgutil.get_loader was deprecated in Python 3.12 and completely removed in Python 3.14.

maestrowf depends on pkgutil and this caps his usability to < 3.14.

(btk_venv) (maestro-3-14-broken) amassidda@8be022c-lcelt:~/workspace/benchmarking_toolkit$ maestro run -fg -y --hashws -s 60 btk_config_rendered_spec.yml 
Traceback (most recent call last):
  File "/home/amassidda/workspace/benchmarking_toolkit/btk_venv/bin/maestro", line 4, in <module>
    from maestrowf.maestro import main
  File "/home/amassidda/workspace/benchmarking_toolkit/btk_venv/lib/python3.14/site-packages/maestrowf/maestro.py", line 43, in <module>
    from maestrowf.conductor import Conductor
  File "/home/amassidda/workspace/benchmarking_toolkit/btk_venv/lib/python3.14/site-packages/maestrowf/conductor.py", line 44, in <module>
    from maestrowf.datastructures.core import Study
  File "/home/amassidda/workspace/benchmarking_toolkit/btk_venv/lib/python3.14/site-packages/maestrowf/datastructures/core/__init__.py", line 48, in <module>
    from maestrowf.datastructures.core.executiongraph import ExecutionGraph
  File "/home/amassidda/workspace/benchmarking_toolkit/btk_venv/lib/python3.14/site-packages/maestrowf/datastructures/core/executiongraph.py", line 18, in <module>
    from maestrowf.interfaces import ScriptAdapterFactory
  File "/home/amassidda/workspace/benchmarking_toolkit/btk_venv/lib/python3.14/site-packages/maestrowf/interfaces/__init__.py", line 68, in <module>
    class ScriptAdapterFactory(object):
    ...<21 lines>...
            return cls.factories.keys()
  File "/home/amassidda/workspace/benchmarking_toolkit/btk_venv/lib/python3.14/site-packages/maestrowf/interfaces/__init__.py", line 74, in ScriptAdapterFactory
    adapter.key: adapter for adapter in iter_adapters()
                                        ~~~~~~~~~~~~~^^
  File "/home/amassidda/workspace/benchmarking_toolkit/btk_venv/lib/python3.14/site-packages/maestrowf/interfaces/__init__.py", line 50, in iter_adapters
    loader = pkgutil.get_loader('maestrowf.interfaces.script')
             ^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'get_loader'

As it is right now we should pin the version to < 3.14

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions