File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,24 @@ mcp = "mcp.cli:app [cli]"
5454[tool .uv ]
5555default-groups = [" dev" , " docs" ]
5656required-version = " >=0.9.5"
57+ # PEP 517 build isolation fetches [build-system].requires (and transitives) at
58+ # floating-latest with no hash check on every fresh sync; uv does not lock them
59+ # (astral-sh/uv#5190). Pinning here narrows that to known-good versions. Covers
60+ # the workspace builds (hatchling + uv-dynamic-versioning) and the legacy
61+ # setuptools fallback used by the strict-no-cover git dep.
62+ build-constraint-dependencies = [
63+ " hatchling==1.29.0" ,
64+ " uv-dynamic-versioning==0.14.0" ,
65+ " dunamai==1.26.1" ,
66+ " jinja2==3.1.6" ,
67+ " markupsafe==3.0.3" ,
68+ " packaging==26.1" ,
69+ " pathspec==1.0.4" ,
70+ " pluggy==1.6.0" ,
71+ " tomlkit==0.14.0" ,
72+ " trove-classifiers==2026.1.14.14" ,
73+ " setuptools==82.0.1" ,
74+ ]
5775
5876[dependency-groups ]
5977dev = [
Original file line number Diff line number Diff line change 77import anyio
88import httpx
99from anyio .abc import TaskStatus
10- from httpx_sse import aconnect_sse
11- from httpx_sse ._exceptions import SSEError
10+ from httpx_sse import SSEError , aconnect_sse
1211
1312from mcp import types
1413from mcp .shared ._context_streams import create_context_streams
Original file line number Diff line number Diff line change @@ -447,8 +447,8 @@ async def read_resource(
447447 context = Context (mcp_server = self )
448448 try :
449449 resource = await self ._resource_manager .get_resource (uri , context )
450- except ValueError :
451- raise ResourceError (f"Unknown resource: { uri } " )
450+ except ValueError as exc :
451+ raise ResourceError (f"Unknown resource: { uri } " ) from exc
452452
453453 try :
454454 content = await resource .read ()
@@ -1109,4 +1109,4 @@ async def get_prompt(
11091109 )
11101110 except Exception as e :
11111111 logger .exception (f"Error getting prompt { name } " )
1112- raise ValueError (str (e ))
1112+ raise ValueError (str (e )) from e
You can’t perform that action at this time.
0 commit comments