From 840283228ee77fb3dbd737cfe7eb8736d9be5ec8 Mon Sep 17 00:00:00 2001 From: George Weale Date: Mon, 17 Nov 2025 09:02:21 -0800 Subject: [PATCH] feat!: Raise minimum Python version to 3_10 Co-authored-by: George Weale PiperOrigin-RevId: 833363352 --- AGENTS.md | 8 ++------ CONTRIBUTING.md | 2 +- pyproject.toml | 18 +++++++++--------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6bde44be..d0abafb8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -119,7 +119,8 @@ app = App( ### Requirements **Minimum requirements:** -- Python 3.9+ (**Python 3.11+ strongly recommended** for best performance) + +- Python 3.10+ (**Python 3.11+ strongly recommended** for best performance) - `uv` package manager (**required** - faster than pip/venv) **Install uv if not already installed:** @@ -326,11 +327,6 @@ pytest tests/unittests -n auto # Run a specific test file during development pytest tests/unittests/agents/test_llm_agent.py -# Python 3.9 compatibility mode (excludes features requiring 3.10+) -pytest tests/unittests \ - --ignore=tests/unittests/a2a \ - --ignore=tests/unittests/tools/mcp_tool \ - --ignore=tests/unittests/artifacts/test_artifact_service.py ``` ### Testing Philosophy diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae5059e9..2e16003a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -145,7 +145,7 @@ part before or alongside your code PR. 3. **Create and activate a virtual environment:** - **NOTE**: ADK supports Python 3.9+. Python 3.11 and above is strongly + **NOTE**: ADK supports Python 3.10+. Python 3.11 and above is strongly recommended. Create a workspace venv using uv. diff --git a/pyproject.toml b/pyproject.toml index e33d650f..4f8e42bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ name = "google-adk" description = "Agent Development Kit" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" license = { file = "LICENSE" } authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }] classifiers = [ # List of https://pypi.org/classifiers/ @@ -27,7 +27,7 @@ dependencies = [ # go/keep-sorted start "PyYAML>=6.0.2, <7.0.0", # For APIHubToolset. "aiosqlite>=0.21.0", # For SQLite database - "anyio>=4.9.0, <5.0.0;python_version>='3.10'", # For MCP Session Manager + "anyio>=4.9.0, <5.0.0", # For MCP Session Manager "authlib>=1.5.1, <2.0.0", # For RestAPI Tool "click>=8.1.8, <9.0.0", # For CLI tools "fastapi>=0.115.0, <0.119.0", # FastAPI framework @@ -44,7 +44,7 @@ dependencies = [ "google-genai>=1.45.0, <2.0.0", # Google GenAI SDK "graphviz>=0.20.2, <1.0.0", # Graphviz for graph rendering "jsonschema>=4.23.0, <5.0.0", # Agent Builder config validation - "mcp>=1.8.0, <2.0.0;python_version>='3.10'", # For MCP Toolset + "mcp>=1.8.0, <2.0.0", # For MCP Toolset "opentelemetry-api>=1.37.0, <=1.37.0", # OpenTelemetry - limit upper version for sdk and api to not risk breaking changes from unstable _logs package. "opentelemetry-exporter-gcp-logging>=1.9.0a0, <2.0.0", "opentelemetry-exporter-gcp-monitoring>=1.9.0a0, <2.0.0", @@ -93,7 +93,7 @@ dev = [ a2a = [ # go/keep-sorted start - "a2a-sdk>=0.3.11,<0.4.0;python_version>='3.10'", + "a2a-sdk>=0.3.4,<0.4.0", # go/keep-sorted end ] @@ -114,9 +114,9 @@ eval = [ test = [ # go/keep-sorted start - "a2a-sdk>=0.3.0,<0.4.0;python_version>='3.10'", + "a2a-sdk>=0.3.0,<0.4.0", "anthropic>=0.43.0", # For anthropic model tests - "crewai[tools];python_version>='3.10' and python_version<'3.14'", # For CrewaiTool tests + "crewai[tools];python_version>='3.10' and python_version<'3.12'", # For CrewaiTool tests; chromadb/pypika fail on 3.12+ "kubernetes>=29.0.0", # For GkeCodeExecutor "langchain-community>=0.3.17", "langgraph>=0.2.60, <0.4.8", # For LangGraphAgent @@ -126,7 +126,7 @@ test = [ "pytest-asyncio>=0.25.0", "pytest-mock>=3.14.0", "pytest-xdist>=3.6.1", - "pytest>=8.3.4", + "pytest>=9.0.0,<10.0.0", "python-multipart>=0.0.9", "rouge-score>=0.1.2", "tabulate>=0.9.0", @@ -146,7 +146,7 @@ docs = [ extensions = [ "anthropic>=0.43.0", # For anthropic model support "beautifulsoup4>=3.2.2", # For load_web_page tool. - "crewai[tools];python_version>='3.10' and python_version<'3.14'", # For CrewaiTool + "crewai[tools];python_version>='3.10' and python_version<'3.12'", # For CrewaiTool; chromadb/pypika fail on 3.12+ "docker>=7.0.0", # For ContainerCodeExecutor "kubernetes>=29.0.0", # For GkeCodeExecutor "langgraph>=0.2.60, <0.4.8", # For LangGraphAgent @@ -208,7 +208,7 @@ asyncio_mode = "auto" [tool.mypy] -python_version = "3.9" +python_version = "3.10" exclude = "tests/" plugins = ["pydantic.mypy"] # Start with non-strict mode, and swtich to strict mode later.