Skip to content

Bug in pip's pinned preference on packages that have a requirement ==N.* #13030

@notatallshaw

Description

@notatallshaw

Description

The pip resolver prefers packages that are pinned, however it only checks the operator has the string == in it: https://github.com/pypa/pip/blob/24.2/src/pip/_internal/resolution/resolvelib/provider.py#L158

This does not imply a pinned package, as the requirement could be ==1.*, which is not pinned.

Expected behavior

Should consider the version part of the requirement when pinning a package.

pip version

24.2

Python version

Any

OS

Any

How to Reproduce

Install a package where a transative requirement has the form ==N[.M...].*

Output

N/A

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions