Skip to content

After upgrading to pip 22.3, package fails hash check #11557

@matt-carr

Description

@matt-carr

Description

the following requirements file fails to install

#                                                                                                   
# Default dependencies
#
py-healthcheck==1.10.1 \
    --hash=sha256:60bbaab729a89098f0e6723ba5b6ab4ca8bde79b1a1bdb324f2b9e39df33780d

with the following error

➤ pip install --no-cache-dir -r dev-requirements.txt
Collecting py-healthcheck==1.10.1
  Downloading py_healthcheck-1.10.1-py3-none-any.whl (9.3 kB)
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    py-healthcheck==1.10.1 from https://files.pythonhosted.org/packages/cc/6f/4866a0d4739b052ffbdaca540df2ba1023504937a57808a6c71158e6fef4/py_healthcheck-1.10.1-py3-none-any.whl (from -r dev-requirements.txt (line 4)):
        Expected sha256 60bbaab729a89098f0e6723ba5b6ab4ca8bde79b1a1bdb324f2b9e39df33780d
             Got        2c340026acda509073667476e1bd45b66d7c8d345cd6aa8f91b156edd7bd4e02

The install proceeds as expected with pip 22.2.2 and the expected SHA matches the sha on pypi

Expected behavior

The package is installed as expected

pip version

22.3

Python version

3.9.15

OS

WSL2, whatever's running in Github Actions

How to Reproduce

  1. install pip 22.3
  2. pip install --no-cache-dir -r requirements.txt where requirements.txt contains the aforementioned content

Output

Collecting py-healthcheck==1.10.1
  Downloading py_healthcheck-1.10.1-py3-none-any.whl (9.3 kB)
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    py-healthcheck==1.10.1 from https://files.pythonhosted.org/packages/cc/6f/4866a0d4739b052ffbdaca540df2ba1023504937a57808a6c71158e6fef4/py_healthcheck-1.10.1-py3-none-any.whl (from -r dev-requirements.txt (line 4)):
        Expected sha256 60bbaab729a89098f0e6723ba5b6ab4ca8bde79b1a1bdb324f2b9e39df33780d
             Got        2c340026acda509073667476e1bd45b66d7c8d345cd6aa8f91b156edd7bd4e02

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions