mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-17 02:59:11 +02:00
* Fix NameError with future annotations and Context/Depends parameters Closes #3238, closes #905 * chore: Update SDK documentation * Drop unnecessary pre-resolution of annotations Pydantic (even 2.11.7) uses __module__ not __globals__ to resolve annotations, so setting __module__ alone is sufficient. * chore: Update SDK documentation * Restore annotation pre-resolution for Pydantic compat The wrapper's __globals__ is read-only and points to dependencies.py, so some Pydantic versions use it instead of __module__ when resolving string annotations. Pre-resolving via get_type_hints on the original function ensures annotations are type objects before Pydantic sees them. * chore: Update SDK documentation --------- Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| tool | ||
| tool_transform | ||
| __init__.py | ||
| test_standalone_decorator.py | ||
| test_tool_future_annotations.py | ||
| test_tool_timeout.py | ||