fix: change Resource URI fields from AnyUrl to str (#1863)

This commit is contained in:
Felix Weinberger 2026-01-16 08:58:57 +00:00 • committed by GitHub
commit cfb2909631
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,7 +3,6 @@
import warnings
import pytest
from pydantic import AnyUrl
from mcp.server import Server
from mcp.types import (
@ -52,8 +51,8 @@ async def test_list_resources_basic() -> None:
server = Server("test")
test_resources = [
Resource(uri=AnyUrl("file:///test1.txt"), name="Test 1"),
Resource(uri=AnyUrl("file:///test2.txt"), name="Test 2"),
Resource(uri="file:///test1.txt", name="Test 1"),
Resource(uri="file:///test2.txt", name="Test 2"),
]
with warnings.catch_warnings():