fastmcp/tests/server
Chris Guidry ba283ddb4c
Support CallArgument and Depends bindings from uncalled-for 0.4.0 (#4802)
* Support CallArgument and Depends bindings from uncalled-for 0.4.0

uncalled-for 0.4.0 adds explicit argument references: CallArgument()
lets a dependency factory read an argument of the function it serves,
and Depends(factory, **bindings) supplies factory arguments at the
declaration site (https://github.com/chrisguidry/uncalled-for/pull/12).
FastMCP's resolver now opens a frame_scope() around dependency
resolution, with the sanitized user arguments as the frame's provided
values. A CallArgument can reference a tool call's public parameters,
but a caller-supplied value for a dependency parameter name is still
stripped before resolution. CallArgument and CycleError are re-exported
from fastmcp.dependencies, and the dependency-injection docs cover both
features.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Raise the pydocket floor to 0.24.0 outside Windows

pydocket 0.24.0 resolves TaskArgument and CallArgument through
uncalled-for 0.4.0's call-scoped frames. Windows keeps the 0.20.0
floor: the burner-redis<0.1.7 pin there transitively caps pydocket to
<0.20.2, and burner-redis has shipped no fixed release yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Bump the pydocket floor to 0.24.1 for reliable worker shutdown

docket 0.24.1 fixes a lost cancellation in worker shutdown on Python
3.10 and 3.11 (chrisguidry/docket#456): asyncio.wait_for swallowed a
cancellation delivered in the same event-loop tick that its inner future
completed, so cancelling run_forever during our lifespan teardown left
the worker running and hung the test session. That is what timed out the
Python 3.10 and lowest-direct jobs here. The floor stays platform-split;
Windows keeps >=0.20.0 under the burner-redis pin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Drop the Windows burner-redis pin and unify the pydocket floor at 0.24.1

The pin blamed the wrong package. The Windows "interpreter crash" that
motivated it (#4618) was pydocket 0.23.1 losing an external cancellation
during worker teardown; pytest-timeout's hard kill of the hung xdist
worker discarded its stdout and looked like a native fault. Capping
burner-redis also dragged pydocket below 0.20.2, so the two variables
were never separated. The repro matrix on prefectlabs/burner-redis#7
shows the July environment failing as resolved, passing with only
pydocket rolled back, and passing with pydocket 0.24.1 alongside
burner-redis 0.1.7 on Windows. pydocket 0.24.1 carries the fix
(chrisguidry/docket#456), so every platform now shares one floor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: nate nowack <thrast36@gmail.com>
2026-08-13 22:19:17 -05:00
..
auth Add audience pinning to GoogleTokenVerifier (#4827) 2026-08-13 15:59:16 -04:00
http Avoid loading MCP and CLI stacks during lightweight imports (#4763) 2026-08-05 10:56:13 -04:00
middleware Forward proxy server metadata across protocol eras (#4776) 2026-08-06 19:09:05 -04:00
mount Implement SEP-2663 tasks extension: TasksExtension, poll-based task lifecycle 2026-07-21 23:00:38 -04:00
providers Fix StatefulProxyClient reconnection after session failure (#4829) 2026-08-13 16:01:19 -04:00
telemetry feat: Add telemetry interop mode for FastMCP (#4046) 2026-07-27 16:05:29 -04:00
transforms Always emit a tool title, derived from name when unset (#4694) 2026-07-28 17:30:20 -04:00
versioning Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
__init__.py restore 1.x code 2025-04-09 11:54:42 -04:00
test_app_state.py Update docs and test 2025-06-20 13:06:48 -04:00
test_auth_integration.py Migrate to MCP SDK v2.0.0b2 (httpx2) (#4503) 2026-07-18 15:12:47 -04:00
test_auth_integration_errors.py Migrate to MCP SDK v2.0.0b2 (httpx2) (#4503) 2026-07-18 15:12:47 -04:00
test_cache_hints.py Add server-level cache hints (SEP-2549) (#4464) 2026-07-08 09:10:41 -04:00
test_call_arguments.py Support CallArgument and Depends bindings from uncalled-for 0.4.0 (#4802) 2026-08-13 22:19:17 -05:00
test_completions.py Let a server answer argument-completion requests (#4582) 2026-07-21 12:26:24 -04:00
test_context.py Baseline tools-call-sampling; fix removal leftovers flagged by ruff 2026-07-26 15:07:24 -04:00
test_dependencies.py Implement SEP-2663 tasks extension: TasksExtension, poll-based task lifecycle 2026-07-21 23:00:38 -04:00
test_dependencies_advanced.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_event_store.py Serialize the event store's stream list read-modify-write (#4758) 2026-08-06 20:09:36 -04:00
test_extensions.py Implement SEP-2663 tasks extension: TasksExtension, poll-based task lifecycle 2026-07-21 23:00:38 -04:00
test_fastapi_testclient_compat.py fix: FastAPI TestClient compatibility and lifespan re-initialization (#3736) 2026-04-06 19:53:27 -04:00
test_file_server.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_icons.py Audit mode="legacy" pins in server tests and top-level stragglers 2026-07-20 16:00:27 -04:00
test_input_validation.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_legacy_httpx_errors.py Preserve legacy httpx compatibility without importing it (#4766) 2026-08-05 18:09:16 -04:00
test_log_level.py Allow pre-bound HTTP sockets (#4222) 2026-05-23 10:08:49 -04:00
test_logging.py Refactor server.py into mixins (#2939) 2026-01-19 11:36:00 -05:00
test_mrtr_guards.py Forward guard asks through prompt, resource, and template proxies 2026-07-26 16:58:58 -04:00
test_mrtr_guards_components.py Format the split guard-components test module 2026-07-26 17:03:04 -04:00
test_pagination.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_protocol_eras.py Move to the stable MCP Python SDK 2.0.0 (#4655) 2026-07-28 16:31:49 -04:00
test_providers.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_server.py Repoint tests and examples off removed deprecations 2026-07-07 07:53:11 -04:00
test_server_docket.py Implement SEP-2663 tasks extension: TasksExtension, poll-based task lifecycle 2026-07-21 23:00:38 -04:00
test_server_lifespan.py Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
test_server_safety.py fix: reject self-mount to prevent infinite recursion (#3925) 2026-04-14 12:10:19 -04:00
test_session_provider.py Add stateless session state (UserSession / SessionId) (#4604) 2026-07-23 19:21:00 -04:00
test_session_visibility.py Audit mode="legacy" pins in server tests and top-level stragglers 2026-07-20 16:00:27 -04:00
test_sessions.py Add stateless session state (UserSession / SessionId) (#4604) 2026-07-23 19:21:00 -04:00
test_streamable_http_no_redirect.py Migrate to MCP SDK v2.0.0b2 (httpx2) (#4503) 2026-07-18 15:12:47 -04:00
test_tool_annotations.py Implement SEP-2663 tasks extension: TasksExtension, poll-based task lifecycle 2026-07-21 23:00:38 -04:00
test_tool_transformation.py Migrate to MCP SDK v2.0.0b2 (httpx2) (#4503) 2026-07-18 15:12:47 -04:00
test_transport.py Forward-port HTTP host guard compatibility (#4474) 2026-07-08 20:55:56 -04:00