Repository navigation
fix(python-uv): keep lock hashes so require-hashes projects build - #959
Merged
Merged
Conversation
uv pip install runs in the project directory, so it reads [tool.uv.pip] require-hashes from pyproject.toml. Exporting the lock with --no-hashes then left it nothing to verify and the build failed.
🧪 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 (5)
|
vicheey
approved these changes
Nov 13, 2026
vicheey
left a comment
Contributor
There was a problem hiding this comment.
Thanks, small and correct. Keeping the lock's hashes also gets us integrity checks on lock-based builds for free. LGTM.
reedham-aws
approved these changes
Nov 13, 2026
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: Part of #839 (item 3,
require-hashes)Description of changes
A uv project that sets
require-hashes = trueunder[tool.uv.pip]can't be built from itsuv.lock:uv pip installruns in the project directory, so it reads that setting. But the lock was exported with--no-hashes, which left it nothing to check. This PR drops--no-hashes, so the exported requirements carry the hashes from the lock.Projects that don't set
require-hashesare unaffected: uv checks hashes where they're present and still installs path dependencies, which have none. A path dependency combined withrequire-hashes = truestill fails, because uv can't hash a local directory. That conflict is in the project's own config.Description of how you validated changes
test_workflow_uses_lock_file_with_require_hashes. With the fix reverted it fails with the error above.tests/unit,tests/functionalandtests/integrationforpython_uvall pass with uv 0.13.7: 103 passed.require-hashes, a local path dependency, and a path dependency withrequire-hashes. The first three build. The fourth fails as described above.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.