Repository navigation
Conversation
The lock build installs the `uv export` output with `uv pip install -r`, which resolved dependencies again. A package removed with uv_prune came back when a kept package depends on it (e.g. pruning botocore under aws-xray-sdk), along with its own dependencies. The export is already the full locked closure, so install it with --no-deps. Plain requirements.txt builds still resolve dependencies.
🧪 Hands-on test: No problems observed in 7 scenariosCommit Scenarios
Runner's notes in full
🤖 Automated hands-on test — not a review approval · model claude-opus-5.5 · Kiro kiro-cli 2.33.1 · build History (1)
|
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.
Issue #, if available: Follow-up to #966
Description of changes
uv_prune(SAM CLIUvPrune) didn't remove a package that another kept package depends on.uv export --prune botocoreleaves botocore out of the exported requirements, but the next step,uv pip install -r <export>, resolved dependencies again and installed botocore and its dependencies anyway. On Lambda the bundled copy then shadows the runtime's.The export is already the full locked set, so the lock path now installs it with
--no-deps.install_requirements()gets ano_depsoption, and only_build_from_lock_file()sets it, which covers pyproject.toml builds with or withoutuv.lock. requirements.txt builds still resolve dependencies. DESIGN.md is updated.The existing prune test prunes boto3, a direct dependency that nothing else requires, so it passed before this fix. The new integration test prunes botocore under aws-xray-sdk.
Description of how you validated changes
test_workflow_prunes_transitive_dependency_of_kept_packagefails ondevelop(botocore 1.44.7 installed) and passes with the fix. New unit tests check--no-depsis passed only on the lock path.make lintandmake black-checkpass.pytest tests/unitpasses (1078), andtests/integration/workflows/python_uvpasses with uv 0.13.9 (74).--no-deps.developand this branch, a python3.13 arm64 function withUvPrune: [botocore]deployed to Lambda now loads botocore from the runtime instead of/var/task, and the build drops from 30 MB to 2.3 MB. requirements.txt,UvCompileBytecodeand layer builds produce the same output as before.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.