Skip to content

Commit 379cd69

Browse files
dependabot[bot]aivong-openhandsopenhands-agentraymyers
authored
chore(deps): bump fastmcp from 2.12.4 to 2.14.0 (OpenHands#2266)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: aivong-openhands <ai.vong@openhands.dev> Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Ray Myers <ray.myers@gmail.com>
1 parent fd80128 commit 379cd69

3 files changed

Lines changed: 352 additions & 114 deletions

File tree

‎openhands-agent-server/openhands/agent_server/agent-server.spec‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PyInstaller spec for OpenHands Agent Server with PEP 420 (implicit namespace) la
55

66
from pathlib import Path
77
import os
8+
import site
89
from PyInstaller.utils.hooks import (
910
collect_submodules,
1011
collect_data_files,
@@ -24,6 +25,37 @@ PATHEX = [
2425
# Entry script for the agent server package (namespace: openhands/agent_server/__main__.py)
2526
ENTRY = str(project_root / "openhands-agent-server" / "openhands" / "agent_server" / "__main__.py")
2627

28+
# Find fakeredis package location to get commands.json with correct path
29+
def get_fakeredis_data():
30+
"""Get fakeredis data files with correct directory structure.
31+
32+
fakeredis/model/_command_info.py uses Path(__file__).parent.parent / "commands.json"
33+
which means it expects commands.json to be at fakeredis/commands.json when accessed
34+
from fakeredis/model/. We need to ensure the model/ subdirectory exists in the bundle.
35+
"""
36+
import fakeredis
37+
fakeredis_dir = Path(fakeredis.__file__).parent
38+
commands_json = fakeredis_dir / "commands.json"
39+
40+
data_files = []
41+
if commands_json.exists():
42+
# Add commands.json to fakeredis/ directory
43+
data_files.append((str(commands_json), "fakeredis"))
44+
45+
# Add a placeholder file to create the model/ subdirectory structure
46+
# This ensures Path(__file__).parent.parent works correctly for model/ modules
47+
model_dir = fakeredis_dir / "model"
48+
if model_dir.exists():
49+
# Find any .py file in model/ to include (PyInstaller needs at least one file)
50+
for py_file in model_dir.glob("*.py"):
51+
# We don't actually need the .py files (they're compiled), but we need
52+
# the __init__.py to create the directory structure
53+
if py_file.name == "__init__.py":
54+
data_files.append((str(py_file), "fakeredis/model"))
55+
break
56+
57+
return data_files
58+
2759
a = Analysis(
2860
[ENTRY],
2961
pathex=PATHEX,
@@ -35,6 +67,8 @@ a = Analysis(
3567
*collect_data_files("litellm"),
3668
*collect_data_files("fastmcp"),
3769
*collect_data_files("mcp"),
70+
*collect_data_files("fakeredis"), # Required for commands.json used by fakeredis ACL
71+
*get_fakeredis_data(), # Ensure fakeredis/model/ directory structure exists
3872

3973
# OpenHands SDK prompt templates (adjusted for shallow namespace layout)
4074
*collect_data_files("openhands.sdk.agent", includes=["prompts/*.j2"]),
@@ -63,6 +97,8 @@ a = Analysis(
6397
*collect_submodules("tiktoken_ext"),
6498
*collect_submodules("litellm"),
6599
*collect_submodules("fastmcp"),
100+
*collect_submodules("fakeredis"),
101+
*collect_submodules("lupa"), # Required for fakeredis[lua] Lua scripting support
66102

67103
# mcp subpackages used at runtime (avoid CLI)
68104
"mcp.types",

‎openhands-sdk/pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ requires-python = ">=3.12"
77
dependencies = [
88
"agent-client-protocol>=0.8.1",
99
"deprecation>=2.1.0",
10+
"fakeredis[lua]>=2.32.1", # Explicit dependency for docket/fastmcp background tasks
1011
"fastmcp>=2.11.3",
1112
"filelock>=3.20.1",
1213
"httpx>=0.27.0",

0 commit comments

Comments
 (0)