Skip to content

fix(aws-strands): lower Python floor to 3.10 - #2285

Open
Vishal0203 wants to merge 1 commit into
ag-ui-protocol:mainfrom
Vishal0203:fix/aws-strands-python-310
Open

fix(aws-strands): lower Python floor to 3.10#2285
Vishal0203 wants to merge 1 commit into
ag-ui-protocol:mainfrom
Vishal0203:fix/aws-strands-python-310

Conversation

@Vishal0203

Copy link
Copy Markdown

Fixes #2282

Problem

ag_ui_strands declares requires-python = ">=3.12, <3.14", which blocks environments pinned to Python 3.10. As reported in #2282, users currently have to patch the package locally to install it.

Notably the package README has advertised - Python 3.10+ under Prerequisites since the integration first landed in #675 — the same commit that set the floor to >=3.12. So the documented contract and the enforced metadata have disagreed from the start; this PR makes the metadata match the promise.

Why 3.10 is safe

Nothing in the adapter needs 3.11+:

  • Syntax: every file under src/, tests/, and examples/ parses with ast.parse(..., feature_version=(3, 10)). The only modern constructs are PEP 604 unions (X | None), which are 3.10+ at runtime. No match statements, StrEnum, TaskGroup, ExceptionGroup/except*, itertools.batched, typing.Self, @override, datetime.UTC, or tomllib.
  • Dependencies: all of them already support 3.10 — strands-agents is >=3.10 (classified 3.10–3.13), ag-ui-a2ui-toolkit is >=3.10,<3.15, ag-ui-protocol is >=3.9. Sibling integrations in this repo are already on 3.10 (langgraph, adk-middleware, agent-spec, langroid, crew-ai), so aws-strands was the outlier.

Changes

  • pyproject.tomlrequires-python = ">=3.10, <3.14"
  • examples/pyproject.tomlpython = "<3.14,>=3.10"
  • examples/README.md — supported range now reads 3.10 – 3.13
  • uv.lock — regenerated; adds 3.10 backports (exceptiongroup, tomli, backports-asyncio-runner) behind python_full_version < '3.11' markers

One incidental fix: regenerating the lock also moves ag-ui-a2ui-toolkit 0.0.3 → 0.0.4. The committed pyproject.toml already required >=0.0.4 while the lock still pinned 0.0.3, so uv lock --check was failing on main before this PR. Happy to split that out if you'd prefer it separate.

The upper bound <3.14 is unchanged — this only lowers the floor.

Verification (CPython 3.10.20)

  • uv sync --python 3.10 --frozen --all-groups — resolves and installs
  • import ag_ui_strands — all 20 public exports load
  • pytest tests/176 passed, 2 skipped
  • poetry install in examples/ on a 3.10 interpreter, then import server.__main__ — OK
  • uv build — built wheel reports Requires-Python: <3.14,>=3.10

No CI changes needed: no workflow pins a Python version for this package, and build-python-preview only runs uv build.

The ag_ui_strands package required Python >=3.12, which blocked users
whose environments are pinned to 3.10 and forced them to patch the
package locally. Nothing in the adapter actually needs 3.11+ syntax or
stdlib: the only modern constructs are PEP 604 unions (3.10+), and every
dependency already supports 3.10 (strands-agents >=3.10,
ag-ui-a2ui-toolkit >=3.10, ag-ui-protocol >=3.9).

The package README already advertised "Python 3.10+", so this also
resolves that inconsistency.

- pyproject.toml: requires-python = ">=3.10, <3.14"
- examples/pyproject.toml: python = "<3.14,>=3.10"
- examples/README.md: state the supported range as 3.10 - 3.13
- uv.lock: regenerate; adds the 3.10 backports (exceptiongroup, tomli,
  backports-asyncio-runner) behind python_full_version markers

Regenerating the lock also picks up ag-ui-a2ui-toolkit 0.0.4, which the
committed pyproject already required but the lock still pinned at 0.0.3.

Verified on CPython 3.10.20: uv sync --frozen resolves and installs, the
package imports, the full test suite passes (176 passed, 2 skipped), the
example server imports, and the built wheel reports
Requires-Python: <3.14,>=3.10.

Fixes ag-ui-protocol#2282
@Vishal0203

Copy link
Copy Markdown
Author

Hi @ranst91 , sorry for the tag. Would appreciate a review. This will unblock us!

@aviau

aviau commented Aug 1, 2026

Copy link
Copy Markdown

Is there even still a reason for <3.14 ?

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.

[Feature]: Extend support for Python 3.10 for aws-strands integration

2 participants