fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540)

* pin pydantic-monty to 0.0.8

* rename tool/prompt/resource base modules to avoid decorator name shadow

* add sys.modules shims for old submodule import paths

* preserve original module paths in deprecation warnings

* clarify when sys.modules shims can be removed
This commit is contained in:
Jeremiah Lowin 2026-03-17 18:11:42 -04:00 committed by GitHub
commit 360c9c31e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
107 changed files with 202 additions and 178 deletions

View file

@ -1,8 +1,8 @@
import pytest
from pydantic import AnyUrl, BaseModel
from fastmcp.resources.base import ResourceContent
from fastmcp.resources.function_resource import FunctionResource
from fastmcp.resources.resource import ResourceContent
class TestFunctionResource: