fastmcp/fastmcp_slim/fastmcp/client
kbkb628 56652209ec
fix(stdio): tolerate a transport whose construction failed in __del__ (#5256)
`StdioTransport` subclasses validate the command before calling
`super().__init__()`, so an object whose construction raised never got a
`_stop_event`. Garbage collection then ran `__del__`, which dereferenced it, and
CPython printed an unraisable `AttributeError` on stderr — burying the error the
caller was meant to see (`PythonStdioTransport`, `NodeStdioTransport` and
`UvStdioTransport` can each reach that path).

`__del__` now reads the event with `getattr` and skips it when the instance never
finished initialising.

Fixes #5255

🤖 Generated with Claude Code

Co-authored-by: nate nowack <thrast36@gmail.com>
2026-09-24 10:06:18 -05:00
..
auth Move to the stable MCP Python SDK 2.0.0 (#4655) 2026-07-28 16:31:49 -04:00
mixins fix: follow empty pagination cursors in client lists (#5026) 2026-09-14 13:00:57 -05:00
sampling Support anthropic 1.x alongside 0.x (#5066) 2026-09-11 12:47:03 -05:00
transports fix(stdio): tolerate a transport whose construction failed in __del__ (#5256) 2026-09-24 10:06:18 -05:00
__init__.py Add machine-to-machine client authentication (#4583) 2026-07-21 12:27:08 -04:00
_sdk_context_shim.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
caching.py Add KeyValueResponseCacheStore for distributed client response caching (#4479) 2026-07-17 16:41:35 -04:00
client.py Release a Client's session hold before any await when a context exits (#5223) 2026-09-22 17:57:18 -05:00
dependencies.py Fix proxy forwarding of MCP transport headers (#4853) 2026-08-18 12:36:24 -04:00
elicitation.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
extension_hooks.py Address review feedback on SEP-2663 tasks 2026-07-22 19:14:16 -04:00
group.py Release a Client's session hold before any await when a context exits (#5223) 2026-09-22 17:57:18 -05:00
logging.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
messages.py Move to the stable MCP Python SDK 2.0.0 (#4655) 2026-07-28 16:31:49 -04:00
oauth_callback.py [codex] Add OAuthProxy RFC 9207 issuer responses (#4438) 2026-07-19 09:52:43 -04:00
progress.py Move to the stable MCP Python SDK 2.0.0 (#4655) 2026-07-28 16:31:49 -04:00
roots.py Fix static analysis under newer ty releases (#4831) 2026-08-14 13:09:44 -04:00
telemetry.py Preserve telemetry attributes when a sampler does not forward them (#4539) 2026-07-19 09:00:04 -04:00