Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort wheel files such that the build number is used only as a tie-breaker #9565

Closed
1 task done
brettcannon opened this issue Feb 5, 2021 · 2 comments · Fixed by #9575
Closed
1 task done

Sort wheel files such that the build number is used only as a tie-breaker #9565

brettcannon opened this issue Feb 5, 2021 · 2 comments · Fixed by #9575
Labels
state: awaiting PR Feature discussed, PR is needed type: bug A confirmed bug or unintended behavior

Comments

@brettcannon
Copy link
Member

pip version

21.0.1

Python version

N/A

OS

N/A

Additional information

No response

Description

Pip currently sorts a wheel's build number higher than the other tags in a wheel.

Expected behavior

The build number should be used to break ties between wheel files when all other details are equal (i.e. name, version, and other tags). See the update to PEP 427 for more details.

How to Reproduce

No response

Output

No response

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@brettcannon brettcannon added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Feb 5, 2021
@pradyunsg pradyunsg added state: awaiting PR Feature discussed, PR is needed and removed S: needs triage Issues/PRs that need to be triaged labels Feb 6, 2021
@uranusjr
Copy link
Member

uranusjr commented Feb 8, 2021

The implementation is easy, just flip the last two components here:

return (
has_allowed_hash, yank_value, binary_preference, candidate.version,
build_tag, pri,
)

(i.e. pri, build_tag instead of build_tag, pri.)

The bulk of the work would be to come up with suitable test cases for this.

@hexagonrecursion
Copy link
Contributor

I am working on a test for this

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
state: awaiting PR Feature discussed, PR is needed type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants