Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aws_lambda_builders/workflows/python_uv/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ def _build_from_lock_file(
"requirements.txt",
"--no-emit-project", # Don't include the project itself, only dependencies
"--no-hashes", # Skip hashes for cleaner output (optional)
"--no-default-groups", # Exclude PEP 735 default groups (e.g. dev/test) from Lambda zips
"--output-file",
temp_requirements,
# We want to specify the version because `uv export` might default to using a different one
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/workflows/python_uv/test_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ def test_build_dependencies_pyproject_with_uv_lock(self):
# Verify it checked for uv.lock in the right location
mock_exists.assert_called_with(os.path.join("path", "to", "uv.lock"))

# Verify export excludes PEP 735 default dependency-groups (dev/test deps
# must not land in Lambda zips).
export_args = self.mock_uv_runner._uv.run_uv_command.call_args[0][0]
self.assertIn("--no-default-groups", export_args)

def test_build_dependencies_pyproject_without_uv_lock(self):
"""Test that pyproject.toml without uv.lock uses standard pyproject build."""
with (
Expand Down
Loading