Files
modelcontextprotocol--pytho…/tests/shared
Max Isbey 2128b57a84 Resolve submodules of mcp.client, mcp.server, mcp.shared and mcp.os on attribute access
Adds a small PEP 562 __getattr__ factory (mcp.shared._lazy_submodules) and
installs it on the four packages, so attribute chains that used to resolve only
because the top-level package imported everything eagerly - e.g.
import mcp; mcp.client.stdio.stdio_client - keep resolving now that the mcp
package is lazy: touching pkg.name imports the submodule pkg.name if it exists,
raising AttributeError otherwise and surfacing a submodule's own missing
dependency as its real ImportError.
2026-07-29 19:45:15 +00:00
..