From 26fd61d9522d40ccf011fd11c07f92ecb1f3a5ba Mon Sep 17 00:00:00 2001 From: Stefano Dalla Gasperina Date: Mon, 3 Nov 2025 23:55:26 -0600 Subject: [PATCH 1/3] Fixed Python version to >= 3.11 to fix compatibility imports for ExceptionGroup and TaskGroup --- clients/gemini_live/gemini_client.py | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clients/gemini_live/gemini_client.py b/clients/gemini_live/gemini_client.py index f03a761..23ece92 100644 --- a/clients/gemini_live/gemini_client.py +++ b/clients/gemini_live/gemini_client.py @@ -343,13 +343,13 @@ async def run(self): await send_text_task raise asyncio.CancelledError("User requested exit") - except asyncio.CancelledError: - # Normal exit when user types 'q' - print("\nGoodbye!") - pass - except asyncio.ExceptionGroup as exception_group: + except* Exception as exception_group: # Handle any errors that occurred in the task group - traceback.print_exception(exception_group) + # Check if it's a CancelledError (normal exit) + if any(isinstance(exc, asyncio.CancelledError) for exc in exception_group.exceptions): + print("\nGoodbye!") + else: + traceback.print_exception(type(exception_group), exception_group, exception_group.__traceback__) def main(): diff --git a/pyproject.toml b/pyproject.toml index ac6f939..c6ae149 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "robot-mcp-client" version = "0.1.0" description = "Connect AI Language Models with Robots on ROS using MCP" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" authors = [ { name = "Stefano Dalla Gasperina"}, { name = "Rohit John Varghese"}, From bb1468aa85b8a44863962efe38fda954e27a6fb7 Mon Sep 17 00:00:00 2001 From: Stefano Dalla Gasperina Date: Mon, 3 Nov 2025 23:57:55 -0600 Subject: [PATCH 2/3] ruff format --- clients/gemini_live/gemini_client.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/clients/gemini_live/gemini_client.py b/clients/gemini_live/gemini_client.py index 23ece92..5a473bc 100644 --- a/clients/gemini_live/gemini_client.py +++ b/clients/gemini_live/gemini_client.py @@ -346,10 +346,17 @@ async def run(self): except* Exception as exception_group: # Handle any errors that occurred in the task group # Check if it's a CancelledError (normal exit) - if any(isinstance(exc, asyncio.CancelledError) for exc in exception_group.exceptions): + if any( + isinstance(exc, asyncio.CancelledError) + for exc in exception_group.exceptions + ): print("\nGoodbye!") else: - traceback.print_exception(type(exception_group), exception_group, exception_group.__traceback__) + traceback.print_exception( + type(exception_group), + exception_group, + exception_group.__traceback__, + ) def main(): From cfa3841e003ed0342518acb32292170782254231 Mon Sep 17 00:00:00 2001 From: Stefano Dalla Gasperina Date: Tue, 4 Nov 2025 00:02:35 -0600 Subject: [PATCH 3/3] Updated setup.sh for Python 3.11 --- setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 20d706e..dc49fca 100755 --- a/setup.sh +++ b/setup.sh @@ -16,7 +16,7 @@ esac echo "Detected OS: $PLATFORM" -# Ensure Python 3.10+ +# Ensure Python 3.11+ (Note: uv will auto-download the correct version if needed) ensure_python() { case "$PLATFORM" in mac) @@ -25,7 +25,7 @@ ensure_python() { echo "Installing Python via Homebrew..." brew install python@3.11 || brew install python@3.12 else - echo "Install Python 3.10+ from https://www.python.org/downloads/" + echo "Install Python 3.11+ from https://www.python.org/downloads/" fi fi ;; @@ -39,13 +39,13 @@ ensure_python() { elif command -v pacman >/dev/null 2>&1; then sudo pacman -S --noconfirm python python-virtualenv else - echo "Install Python 3.10+ using your package manager" + echo "Install Python 3.11+ using your package manager" fi fi ;; windows) if ! command -v python >/dev/null 2>&1 && ! command -v python3 >/dev/null 2>&1; then - echo "Install Python 3.10+ from https://www.python.org/downloads/ and add to PATH" + echo "Install Python 3.11+ from https://www.python.org/downloads/ and add to PATH" fi ;; esac