fix(aws-strands): lower Python floor to 3.10 - #2285
Open
Vishal0203 wants to merge 1 commit into
Open
Conversation
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
1 task
Author
|
Hi @ranst91 , sorry for the tag. Would appreciate a review. This will unblock us! |
|
Is there even still a reason for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2282
Problem
ag_ui_strandsdeclaresrequires-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+:
src/,tests/, andexamples/parses withast.parse(..., feature_version=(3, 10)). The only modern constructs are PEP 604 unions (X | None), which are 3.10+ at runtime. Nomatchstatements,StrEnum,TaskGroup,ExceptionGroup/except*,itertools.batched,typing.Self,@override,datetime.UTC, ortomllib.strands-agentsis>=3.10(classified 3.10–3.13),ag-ui-a2ui-toolkitis>=3.10,<3.15,ag-ui-protocolis>=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.toml—requires-python = ">=3.10, <3.14"examples/pyproject.toml—python = "<3.14,>=3.10"examples/README.md— supported range now reads 3.10 – 3.13uv.lock— regenerated; adds 3.10 backports (exceptiongroup,tomli,backports-asyncio-runner) behindpython_full_version < '3.11'markersOne incidental fix: regenerating the lock also moves
ag-ui-a2ui-toolkit0.0.3 → 0.0.4. The committedpyproject.tomlalready required>=0.0.4while the lock still pinned 0.0.3, souv lock --checkwas failing onmainbefore this PR. Happy to split that out if you'd prefer it separate.The upper bound
<3.14is unchanged — this only lowers the floor.Verification (CPython 3.10.20)
uv sync --python 3.10 --frozen --all-groups— resolves and installsimport ag_ui_strands— all 20 public exports loadpytest tests/— 176 passed, 2 skippedpoetry installinexamples/on a 3.10 interpreter, thenimport server.__main__— OKuv build— built wheel reportsRequires-Python: <3.14,>=3.10No CI changes needed: no workflow pins a Python version for this package, and
build-python-previewonly runsuv build.