Skip to content

Installation fails if a package publishes a late built distribution #5550

@n1ngu

Description

@n1ngu

Update

Waiting on pypa/pip#11692


Issue description

  • Given a former release of a project that did not initially include a built distribution for your target platform
  • When a built distribution is published days or years after Pipfile.lock was generated
  • Then installation fails because the preferred built distribution does not match any of the hashes listed in the lockfile

E.g. see https://gitlab.com/doctormo/python-crontab/-/issues/103

python-crontab 2.6.0 was released on Oct 19th, 2021 but only a source .tar.gz distribution. Yesterday Dec 20th, 2022 a built .whl distribution was pushed for the same 2.6.0 version. Because the wheel is preferred by default, installation fails.

Expected result

Installation should fallback to the less specific distributions whose hashes are listed in the lockfile, up to the source distribution.

Actual result

Installation fails.

Steps to replicate

As this is a time-sensitive issue, coupled with artifacts published in the python index under use, I guess the easiest reproduction steps is just to manipulate an existing valid Pipfile.lock removing the hashes of distributions prebuilt for your platform, or leaving only the .tar.gz hash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Enhancement 💡This is a feature or enhancement request.Type: Question ❔This is a question or a request for support.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions