perf: lazy-load backend modules and consolidate docker subprocess helpers #383

Merged
didericis merged 3 commits from lazy-backend-imports into main 2026-07-18 05:14:28 -04:00
Showing only changes of commit 4b8b09ab83 - Show all commits
+4 -4
View File
@@ -598,7 +598,7 @@ _BACKENDS: dict[str, BottleBackend[Any, Any]] | None = None
def _get_backends() -> dict[str, BottleBackend[Any, Any]]:
"""Return the registry of all backend instances, loading lazily on first call."""
global _BACKENDS
global _BACKENDS # pylint: disable=global-statement
if _BACKENDS is None:
from .docker import DockerBottleBackend
from .firecracker import FirecrackerBottleBackend
@@ -729,12 +729,12 @@ __all__ = [
"BottleCleanupPlan",
"BottlePlan",
"BottleSpec",
"CommitCancelled",
"CommitCancelled", # pylint: disable=undefined-all-variable
"ExecResult",
"Freezer",
"Freezer", # pylint: disable=undefined-all-variable
"enumerate_active_agents",
"get_bottle_backend",
"get_freezer",
"get_freezer", # pylint: disable=undefined-all-variable
"has_backend",
"known_backend_names",
]