Enforce pip hashes with an offline wheelhouse before deployment
A dependency install can appear repeatable right up to the moment a package file changes behind an unchanged version pin. idna==3.10 tells pip which release to select. It does not, by itself, state which exact wheel or source archive the installer is allowed to accept. A hash-checked requirements file closes that gap by making the expected file digest part of the deployment input.
This guide builds a small offline wheelhouse and tests both outcomes with pip 26.1.2 on Python 3.13.5: a wheel whose SHA-256 digest matches the requirements file installs into a disposable target, while the same wheel with an intentionally wrong digest is rejected. The useful boundary is not a successful download. It is proving that the installer refuses a file when the declared digest and the bytes on disk disagree.