Skip to content

feat(build): graduate python-uv build method from beta - #9451

Merged
bnusunny merged 1 commit into
aws:developfrom
bnusunny:feat/python-uv-ungate
Nov 19, 2026
Merged

bnusunny merged 1 commit into
aws:developfrom
bnusunny:feat/python-uv-ungate

Conversation

@bnusunny

@bnusunny bnusunny commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Which issue(s) does this change fix?

Related to aws/aws-lambda-builders#839

Why is this change necessary?

BuildMethod: python-uv is ready to come out of beta.

How does it address the issue?

Removes the python-uv beta flag and its beta check, like #8526 did for Rust. Users no longer need --beta-features to build with python-uv.

What side effects does this change have?

None for existing users. --beta-features and SAM_CLI_BETA_UV_PACKAGE_MANAGER=1 are still accepted; the env var just has no effect now.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Building with BuildMethod: python-uv no longer needs --beta-features or
SAM_CLI_BETA_UV_PACKAGE_MANAGER=1. Setting either one is still accepted
and has no effect on python-uv builds.
@bnusunny
bnusunny requested a review from a team as a code owner November 19, 2026 17:10
@github-actions github-actions Bot added the area/build sam build command label Nov 19, 2026
@aws-sam-tooling-bot

Copy link
Copy Markdown

🧪 Hands-on test: No problems observed in 6 scenarios

Commit 0278c3e · build LambdaToolingHandsOn-NoDocker:72b872f2-8561-4129-befe-5034732dcd76. The plan's scenarios ran on an isolated build host; a problem is reported only if it reproduced at least twice. Passing scenarios show only that these checks behaved as expected, not that the change is correct.

Scenarios

Scenario Planned check Result Runner's note
S1 Main path: sam build with BuildMethod python-uv, no beta flag and stdin closed (as in CI) should build without a beta p… ✅ pass Head: samdev build (the SAM_CLI_DEV=1 entrypoint; sam is not installed in dev mode) with BuildMethod python-uv, no beta flag, stdin </dev/null, Runtime=python3.11: EXIT=0, 'Build Succeeded', no b…
S2 Existing configs must keep working: --beta-features is still accepted together with a python-uv function. ✅ pass Head: samdev build --beta-features with python-uv, stdin </dev/null: the generic 'Experimental features are enabled for this session' banner, then 'Build Succeeded', EXIT=0, no 'No such option' and…
S3 The PR description says SAM_CLI_BETA_UV_PACKAGE_MANAGER=1 is still accepted and has no effect. Setting it must not brea… ✅ pass Head: SAM_CLI_BETA_UV_PACKAGE_MANAGER=1 samdev build, stdin </dev/null: 'Build Succeeded', EXIT=0, no 'is a beta feature' text. Build dir has six.py. The variable has no visible effect, which matches…
S4 JSON output mode with python-uv: the beta-prompt code path that skipped JSON mode was rewritten, so stdout must still b… ✅ pass Head: samdev build --output json with python-uv: EXIT=0. stdout is one JSON object with keys build_dir, resources, status=success, template_file, type, and it parses without error. grep counts 0 'b…
S5 Mixed template: a python-uv function using requirements.txt, a python-uv function using pyproject.toml, and a default p… ✅ pass Head: a mixed template with UvReqFunction (python-uv, requirements.txt), UvPyProjectFunction (python-uv, pyproject.toml) and PipFunction (default) builds in one run: EXIT=0, 'Build Succeeded', no pro…
S6 Run the unit tests the PR updates, plus related python-uv workflow tests, to confirm the flag count (5) and the new EXP… ✅ pass Head: test_experimental.py, test_build_context.py and test_workflow_config.py: 188 passed, 0 failed. A targeted -k run confirms that test_get_all_experimental, test_check_build_method_experimental_fl…
Runner's notes in full
  • S1: Head: samdev build (the SAM_CLI_DEV=1 entrypoint; sam is not installed in dev mode) with BuildMethod python-uv, no beta flag, stdin </dev/null, Runtime=python3.11: EXIT=0, 'Build Succeeded', no beta prompt. .aws-sam/build/UvFunction has app.py and six.py. Base, in an isolated copy (log 07): 'Build method "python-uv" is a beta feature ... [y/N]: Aborted!', EXIT=1, no build directory. Log 06 is an invalid base run: it ran in parallel with head in the same directory, so its ls showed head's artifacts.
  • S2: Head: samdev build --beta-features with python-uv, stdin </dev/null: the generic 'Experimental features are enabled for this session' banner, then 'Build Succeeded', EXIT=0, no 'No such option' and no python-uv beta prompt. Build dir has app.py and six.py.
  • S3: Head: SAM_CLI_BETA_UV_PACKAGE_MANAGER=1 samdev build, stdin </dev/null: 'Build Succeeded', EXIT=0, no 'is a beta feature' text. Build dir has six.py. The variable has no visible effect, which matches the PR description. git grep finds no remaining references to UvPackageManager or UV_PACKAGE_MANAGER in head.
  • S4: Head: samdev build --output json with python-uv: EXIT=0. stdout is one JSON object with keys build_dir, resources, status=success, template_file, type, and it parses without error. grep counts 0 'beta feature' matches in both stdout and stderr. Progress lines go to stderr only. Build dir has six.py.
  • S5: Head: a mixed template with UvReqFunction (python-uv, requirements.txt), UvPyProjectFunction (python-uv, pyproject.toml) and PipFunction (default) builds in one run: EXIT=0, 'Build Succeeded', no prompt. All three build dirs contain app.py and six.py. The single-resource samdev build UvPyProjectFunction also gives EXIT=0 and builds only that function. Base: the first build aborts at the python-uv beta prompt ('Aborted!', EXIT=1). Side note, not caused by this PR: the uv workflow wrote uv.lock into the source dir uvproj/, and the second build picked it up.
  • S6: Head: test_experimental.py, test_build_context.py and test_workflow_config.py: 188 passed, 0 failed. A targeted -k run confirms that test_get_all_experimental, test_check_build_method_experimental_flag_prompts_for_beta_method and test_python_uv_is_not_a_beta_build_method pass.

🤖 Automated hands-on test — not a review approval · model claude-opus-5.5 · Kiro kiro-cli 2.33.1 · build LambdaToolingHandsOn-NoDocker:72b872f2-8561-4129-befe-5034732dcd76 · commit 0278c3e

History (1)
Commit Result When (UTC) Build
0278c3e No problems observed 2026-11-19 17:18 LambdaToolingHandsOn-NoDocker:72b872f2-8561-4129-befe-5034732dcd76

@bnusunny
bnusunny added this pull request to the merge queue Nov 19, 2026
Merged via the queue into aws:develop with commit 021601e Nov 19, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build sam build command pr/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants