This is an automated email from the ASF dual-hosted git repository.
jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new ade36727eb [#10743] fix(mcp): pin fakeredis below 2.35.0 for FastMCP
compatibility (#10744)
ade36727eb is described below
commit ade36727eb474f49b2358193722d94461d0eb964
Author: Qi Yu <[email protected]>
AuthorDate: Mon Apr 13 14:06:35 2026 +0800
[#10743] fix(mcp): pin fakeredis below 2.35.0 for FastMCP compatibility
(#10744)
### What changes were proposed in this pull request?
This PR fixes an MCP runtime compatibility issue by pinning `fakeredis`
to a version range compatible with transitive dependency `pydocket`.
- Added `fakeredis<2.35.0` in `mcp-server/pyproject.toml`
- Regenerated `mcp-server/uv.lock`
### Why are the changes needed?
`fakeredis` 2.35.0 removed `FakeConnection` from `fakeredis.aioredis`,
while `pydocket` (used transitively by `fastmcp`) still imports it at
runtime.
That causes MCP client connection failures with errors like:
`cannot import name 'FakeConnection' from 'fakeredis.aioredis'`.
Fix: #10743
### Does this PR introduce _any_ user-facing change?
Yes. MCP server/client startup becomes stable again under the current
dependency set and no longer fails on `FakeConnection` import errors.
### How was this patch tested?
- `uv lock`
- `uv run pytest tests/unit/tools/test_catalog.py -q`
---------
Co-authored-by: Copilot <[email protected]>
---
mcp-server/pyproject.toml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/mcp-server/pyproject.toml b/mcp-server/pyproject.toml
index 3747199fce..299b4008c5 100644
--- a/mcp-server/pyproject.toml
+++ b/mcp-server/pyproject.toml
@@ -25,6 +25,11 @@ dependencies = [
# fastmcp has been release 3.0.x, which makes some incompatible changes,
so we temporarily pin
# it to 2.14.5 to avoid breaking changes.
"fastmcp==2.14.5",
+ # TODO(#10754): pydocket (a transitive dep of fastmcp>=2.14.0)
+ # requires fakeredis>=2.32.1, but fakeredis 2.35.0 removed FakeConnection
from
+ # fakeredis.aioredis, which pydocket still uses. Pin fakeredis to <2.35.0
until the
+ # tracked pydocket/fakeredis compatibility issue is resolved.
+ "fakeredis<2.35.0",
"parameterized>=0.9.0",
"pytest>=8.4.1",
"pylint>=2.20.0",