fastmcp/tests/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 Scope the M2M storage warning assertion (#5040) 2026-09-08 10:11:34 -05:00
client Release a Client's session hold before any await when a context exits (#5223) 2026-09-22 17:57:18 -05:00
group Release a Client's session hold before any await when a context exits (#5223) 2026-09-22 17:57:18 -05:00
sampling Support anthropic 1.x alongside 0.x (#5066) 2026-09-11 12:47:03 -05:00
telemetry Add SEP-2663 client half: transparent call_tool, ResultClaim, Task handle 2026-07-22 15:21:10 -04:00
transports Remove obsolete Docket memory fixtures (#4912) 2026-08-27 11:08:04 -05:00
__init__.py clean up test inits 2025-05-31 19:32:08 -04:00
minimal_stdio_server.py Make the unit suite fast: in-process HTTP tests, no real sleeps, parallel Windows CI (#4554) 2026-07-20 10:51:14 -04:00
test_client_extensions.py Add SEP-2663 client half: transparent call_tool, ResultClaim, Task handle 2026-07-22 15:21:10 -04:00
test_elicitation.py Remove 3.x-era compatibility shims (#4661) 2026-07-27 14:59:43 -04:00
test_elicitation_enums.py Default fastmcp.Client to mode="auto"; surface extensions=/result_claims= 2026-07-19 21:22:49 -04:00
test_logs.py Audit tests/client/ mode="legacy" pins 2026-07-20 15:43:04 -04:00
test_notifications.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_oauth_callback_race.py Make the unit suite fast: in-process HTTP tests, no real sleeps, parallel Windows CI (#4554) 2026-07-20 10:51:14 -04:00
test_oauth_callback_xss.py Escape all HTML to prevent XSS attack (#2090) 2025-10-14 12:30:21 -07:00
test_openapi.py Audit tests/client/ mode="legacy" pins 2026-07-20 15:43:04 -04:00
test_progress.py Guard default progress handler against zero totals (#3432) 2026-03-07 11:41:11 -05:00
test_roots.py Merge remote-tracking branch 'origin/main' into modern-merge 2026-07-26 14:53:31 -04:00
test_sampling.py Silence ty deprecation diagnostics and drop stale sampling doc mentions 2026-07-26 14:45:55 -04:00
test_slim_package_boundaries.py Expose ClientGroup from package root (#4987) 2026-09-02 17:55:41 -05:00
test_sse.py Make the unit suite fast: in-process HTTP tests, no real sleeps, parallel Windows CI (#4554) 2026-07-20 10:51:14 -04:00
test_stdio.py fix(stdio): tolerate a transport whose construction failed in __del__ (#5256) 2026-09-24 10:06:18 -05:00
test_streamable_http.py Audit tests/client/ mode="legacy" pins 2026-07-20 15:43:04 -04:00