Skip to content

[BUG] Removed reliance on LegacyVersion from pkg_resources can break pip modules #66686

@Legrems

Description

@Legrems

Description
This PR [https://github.com/pypa/setuptools/pull/2822] remove the reliance on LegacyVersion.

Since then, the pip modules could be broken, if there is an InvalidVersion (before, it was only a LegacyVersion) on the pip repo you're using.

Since we were using a custom pip repo (mirror + some custom packages), with some old version, some method on the pip modules would not work. In particular:

  • pip.list_all_versions
  • pip.installed (this call pip.list_all_versions)
  • Probably some others method that call pip.list_all_versions

Setup
Nothing really specific to salt.

Steps to Reproduce the behavior
Have an invalid version in the pip repo history, and then you can't even install the current latest version (which could be valid), since the list_all_versions is failing due to this.

Expected behavior
At least ignore the non-standard version, except of failing completly

Versions Report
3006.8

I will provide a PR soon, since it was quite critical (and we couldn't remove the package from the repo)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behaviorneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions