Skip to content

Fix startup crash on Python 3.14 (Removal of pkgutil.find_loader)#407

Open
Geetansh-Jangid wants to merge 1 commit intovinifmor:masterfrom
Geetansh-Jangid:patch-1
Open

Fix startup crash on Python 3.14 (Removal of pkgutil.find_loader)#407
Geetansh-Jangid wants to merge 1 commit intovinifmor:masterfrom
Geetansh-Jangid:patch-1

Conversation

@Geetansh-Jangid
Copy link
Copy Markdown

As of Python 3.14, the long-deprecated pkgutil.find_loader() has been officially removed from the standard library. This causes bauh to fail immediately on startup with an AttributeError.

The Fix :-

This PR migrates the dynamic module loading logic in gems.py to the modern importlib.util API, which is the standard replacement for pkgutil and imp.

Replaced pkgutil.find_loader with importlib.util.find_spec.

Standardized Indentation: Fixed a TabError (mixed tabs/spaces) introduced in the load_managers loop.

Updated Module Loading: Used spec.loader.load_module() to ensure the controller modules are initialized correctly under the new spec-based system

As of Python 3.14, the long-deprecated pkgutil.find_loader() has been officially removed from the standard library. This causes bauh to fail immediately on startup with an AttributeError.

The Fix :-

This PR migrates the dynamic module loading logic in gems.py to the modern importlib.util API, which is the standard replacement for pkgutil and imp.

    Replaced pkgutil.find_loader with importlib.util.find_spec.

    Standardized Indentation: Fixed a TabError (mixed tabs/spaces) introduced in the load_managers loop.

    Updated Module Loading: Used spec.loader.load_module() to ensure the controller modules are initialized correctly under the new spec-based system
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.

1 participant