Repository navigation
Adds a reusable helper for upgrading a prefetch to include a SHA-256 hash.
Features
- Added
bigfix_prefetch.prefetch.add_sha256_prefetch(prefetch_to_update, save_file=False), which parses an existing prefetch, fetches the file to compute the missing hash, and returns the updated prefetch string with its original type (block or statement) preserved. Previously this logic only existed inline in the example script. examples/add_sha256_prefetch.pynow calls the library function instead of duplicating it, and its version note was updated to require 1.1.4+.
Testing
- Added a test asserting
sha256is present in the output ofadd_sha256_prefetch(), using a sha1-only statement-style prefetch as input. Note this test performs a real network download. - Updated the pip and source test workflows.
Full Changelog: v1.1.4...v1.1.5