Modernize runtime compatibility and initialize Bearhub fork

This commit is contained in:
Sebastian Palencsar
2026-05-26 08:35:29 +02:00
parent b1ea479a3a
commit d541a4cbcf
23 changed files with 132 additions and 96 deletions

View File

@@ -1,6 +1,6 @@
import inspect
import importlib
import os
import pkgutil
from logging import Logger
from typing import List, Generator
@@ -49,11 +49,14 @@ def load_managers(locale: str, context: ApplicationContext, config: dict, defaul
logger.warning(f"gem '{f.name}' could not be loaded because it was marked as forbidden in '{FORBIDDEN_GEMS_FILE}'")
continue
loader = pkgutil.find_loader(f'bauh.gems.{f.name}.controller')
module_name = f'bauh.gems.{f.name}.controller'
if loader:
module = loader.load_module()
try:
module = importlib.import_module(module_name)
except ModuleNotFoundError:
module = None
if module:
manager_class = find_manager(module)
if manager_class: