fix(bma): set requires-python >=3.12 so uv run client.py does not use an older system Python - #2491
Merged
Merged
Conversation
… an older system Python Without requires-python, uv can pick the macOS system Python 3.9 for client.py, and the openai dependency does not install on it. The image still installs the latest Python before it copies pyproject.toml, so the minimum does not pin the image.
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Small, focused change that adds requires-python = ">=3.12" to the BMA pyproject.toml template so uv run client.py doesn't fall back to a system Python 3.9 (which the openai SDK no longer supports). Consistent with the other Python templates, which all set a requires-python minimum.
A few observations, none blocking:
- The
>=3.12bound is stricter than strictly needed for the stated reason (openai SDK dropped 3.9, so>=3.10would suffice, and matches most other templates). If there's a specific reason for 3.12 over 3.10 it might be worth noting in the README paragraph; otherwise>=3.10would be more permissive for client environments. Not a blocker either way. - The updated test nicely asserts that
RUN uv python install --defaultruns beforeCOPY pyproject.tomlso the minimum doesn't inadvertently pin the image build. Good defensive check. - Uses real fs reads against generated output — no excessive mocking. No telemetry needed for a template constant change.
Contributor
Coverage Report
|
Hweinstock
approved these changes
Sep 30, 2026
tejaskash
approved these changes
Sep 30, 2026
10 tasks done
tejaskash
added a commit
that referenced
this pull request
Sep 30, 2026
Mirrors #2491. Without a minimum, uv run client.py can pick the macOS system Python 3.9, which openai does not support.
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.
Description
The
BedrockManagedAgentstemplate has norequires-pythoninpyproject.toml. On macOS,uv run client.pycan then pick the system Python 3.9, andopenaidoes not install on it.This PR sets
requires-python = ">=3.12"in the templatepyproject.toml. It is a minimum only. The Dockerfile still runsuv python install --defaultbefore it copiespyproject.toml, so the image keeps the latest Python, anduv syncchecks the minimum.Changes:
src/assets/python/http/bma/base/pyproject.toml: addrequires-python = ">=3.12".src/assets/python/http/bma/base/README.md: tell the reader why the minimum is there.src/cli/templates/__tests__/bma.test.ts: check the minimum, and check that the image installs Python before it copiespyproject.toml.Related Issue
No issue. The problem came from feedback on the BMA getting started guide.
Documentation PR
None.
Type of Change
Testing
npx vitest run --project unit src/cli/templates/__tests__/bma.test.ts src/assets/__tests__/assets.snapshot.test.ts(164 passed)npm run typechecknpm run test:unitandnpm run test:integnot runChecklist