Skip to content

Bump minimum python version to 3.11#2275

Open
iplay88keys wants to merge 2 commits into
mainfrom
worktree-python-311-bump
Open

Bump minimum python version to 3.11#2275
iplay88keys wants to merge 2 commits into
mainfrom
worktree-python-311-bump

Conversation

@iplay88keys

@iplay88keys iplay88keys commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Raises the minimum supported Python version from 3.10 to 3.11 across the Python workspace. kagent-adk already calls asyncio.Task.uncancel() (added in Python 3.11) in its A2A agent executor (#2176), so 3.10 was broken in practice; this makes the declared floor match. 3.10 also reaches end of life in October 2026.

  • requires-python: >=3.10>=3.11 in all 15 workspace pyprojects (root, packages, samples). The existing <3.14 caps on the crewai packages are unchanged.
  • ruff/black target-version: py310py311 where set.
  • CI: python-test matrix drops 3.10 (now 3.11/3.12/3.13); python-lint installs 3.11.
  • uv.lock regenerated: removes async-timeout, exceptiongroup, and backports-asyncio-runner (3.10-only stdlib backports) and collapses the numpy 2.2.6/2.3.2 split resolution to 2.3.2 only.
  • Removes the now-dead from datetime import UTC try/except 3.10 fallbacks in kagent-langgraph and kagent-openai (ruff UP017 flags them at the py311 target; its autofix mangles the fallback branch, so they are deleted instead). The typing.override fallbacks stay — those need 3.12.
  • CLI Python scaffolding template (go/core/cli/internal/mcp/frameworks/python/templates/pyproject.toml.tmpl): ruff/black target-version and mypy python_version bumped py310/3.10py312/3.12 to match the template's own requires-python = ">=3.12".

Test plan

  • CI python-test matrix (3.11–3.13) runs the full test suite.
  • uv lock resolves cleanly (272 packages).

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
@iplay88keys
iplay88keys marked this pull request as ready for review July 16, 2026 21:43
@iplay88keys
iplay88keys requested review from a team and Charlesthebird as code owners July 16, 2026 21:43
Copilot AI review requested due to automatic review settings July 16, 2026 21:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the declared minimum supported Python version with actual runtime requirements by raising the Python workspace floor from 3.10 to 3.11, and updates CI/lint tooling targets accordingly.

Changes:

  • Bump requires-python from >=3.10 to >=3.11 across workspace packages and samples (keeping existing <3.14 caps where present).
  • Update Ruff/Black target versions from py310 to py311.
  • Update CI to drop Python 3.10 from the test matrix and run linting on Python 3.11; regenerate python/uv.lock.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
python/samples/openai/basic_agent/pyproject.toml Raise sample’s requires-python to >=3.11.
python/samples/langgraph/kebab/pyproject.toml Raise sample’s requires-python to >=3.11.
python/samples/langgraph/hitl-tools/pyproject.toml Raise sample’s requires-python to >=3.11.
python/samples/langgraph/currency/pyproject.toml Raise sample’s requires-python to >=3.11.
python/samples/crewai/research-crew/pyproject.toml Raise sample’s requires-python to >=3.11, <3.14.
python/samples/crewai/poem_flow/pyproject.toml Raise sample’s requires-python to >=3.11, <3.14.
python/pyproject.toml Update Ruff target-version to py311 for the workspace.
python/packages/kagent-skills/pyproject.toml Bump requires-python and update Black/Ruff target versions to py311.
python/packages/kagent-openai/pyproject.toml Bump requires-python and update Black/Ruff target versions to py311.
python/packages/kagent-langgraph/pyproject.toml Bump requires-python and update Black/Ruff target versions to py311.
python/packages/kagent-crewai/pyproject.toml Bump requires-python to >=3.11, <3.14.
python/packages/kagent-core/pyproject.toml Bump requires-python to >=3.11.
python/packages/kagent-adk/pyproject.toml Bump requires-python to >=3.11.
python/packages/agentsts-core/pyproject.toml Bump requires-python to >=3.11.
python/packages/agentsts-adk/pyproject.toml Bump requires-python to >=3.11.
.github/workflows/ci.yaml Drop Python 3.10 from the test matrix; use Python 3.11 for lint job.
python/uv.lock Regenerate lockfile to reflect the updated Python version floor and resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/pyproject.toml
…targets

Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
@iplay88keys

Copy link
Copy Markdown
Contributor Author

@EItanya, python-test (3.10) is marked as required and will need to be removed from the required status checks in the repo's ruleset for main.

@peterj

peterj commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

removed 3.10 from the status checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants