From 7a2e3f2a061daf5c76baa28da038d633ec78986a Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Wed, 29 Apr 2026 01:23:52 +0800 Subject: [PATCH] fix: scope a2a alias finder to submodules only The shim's MetaPathFinder matched the crewai.a2a root, so importlib.reload(crewai.a2a) would swap the shim module for crewai_a2a and drop the shim's __all__ re-exports. --- lib/crewai/src/crewai/a2a/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crewai/src/crewai/a2a/__init__.py b/lib/crewai/src/crewai/a2a/__init__.py index 0703f6e2f..d2ec1c961 100644 --- a/lib/crewai/src/crewai/a2a/__init__.py +++ b/lib/crewai/src/crewai/a2a/__init__.py @@ -34,7 +34,7 @@ class _A2AAliasFinder(MetaPathFinder, Loader): path: Sequence[str] | None = None, target: ModuleType | None = None, ) -> ModuleSpec | None: - if fullname == self._SRC or fullname.startswith(self._SRC + "."): + if fullname.startswith(self._SRC + "."): return ModuleSpec(fullname, self) return None