fastmcp/tests
Jeremiah Lowin 87b4a6fb99 Refactor Client class into mixins for better organization
Split the monolithic Client class into focused mixin classes:
- ClientToolsMixin (tools_client.py)
- ClientPromptsMixin (prompts.py)
- ClientResourcesMixin (resources.py)
- ClientTaskManagementMixin (task_management.py)

Also:
- Extract timeout normalization helpers to utilities/timeout.py
- Split SSETransport into its own module (transports/sse.py)
- Clean up unused imports across client modules
- Fix bare except clauses to catch specific McpError

Note: ty reports unresolved-attribute errors on mixin classes because
it doesn't understand that mixins will be composed with Client. This is
a known limitation of mixin typing in Python. The code is functionally
correct and all tests pass.
2026-01-19 09:21:38 -05:00
..
cli Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
client Refactor Client class into mixins for better organization 2026-01-19 09:21:38 -05:00
contrib Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
deprecated Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
experimental Unify SamplingHandler and promote OpenAI handler (#2616) 2025-12-14 15:22:43 -05:00
fs Add standalone decorators and eliminate fastmcp.fs module (#2832) 2026-01-10 12:16:35 -05:00
integration_tests Fix HTTP transport timeout defaulting to 5 seconds (#2849) 2026-01-12 14:47:21 -05:00
prompts Run sync tools/resources/prompts in threadpool automatically (#2865) 2026-01-13 11:03:05 -05:00
resources Run sync tools/resources/prompts in threadpool automatically (#2865) 2026-01-13 11:03:05 -05:00
server Refactor Client class into mixins for better organization 2026-01-19 09:21:38 -05:00
telemetry Address Jeremiah's telemetry feedback 2026-01-14 09:45:41 -05:00
tools Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
utilities Refactor visibility to mark-based enabled system 2026-01-18 14:36:33 -05:00
__init__.py Update type handling for resources 2024-11-29 19:42:46 -05:00
conftest.py Add OpenTelemetry tracing support 2026-01-14 09:45:41 -05:00
test_mcp_config.py Fix test_multi_client_with_logging to filter OpenTelemetry logs 2026-01-14 09:45:41 -05:00