Skip to content

Commit f7a8345

Browse files
Merge branch 'main' into fix/2539-exclude-none-in-task-result-handler
2 parents 53662c5 + 161834d commit f7a8345

4 files changed

Lines changed: 35 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ mcp = "mcp.cli:app [cli]"
5454
[tool.uv]
5555
default-groups = ["dev", "docs"]
5656
required-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]
5977
dev = [

src/mcp/client/sse.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
import anyio
88
import httpx
99
from 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

1312
from mcp import types
1413
from mcp.shared._context_streams import create_context_streams

src/mcp/server/mcpserver/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

uv.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)