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

Stable sorting of requirements.txt in universal mode #5334

Merged

Conversation

konstin
Copy link
Member

@konstin konstin commented Jul 23, 2024

The RequirementsTxtComparator was written assuming there is one distribution per package name. This changed with the universal resolution, which allows multiple versions or urls for the same package name. The sorting we emitted for these new entries was incidental.

With this change, we properly sort these entries by name, version and then url in universal mode.

This is an output format change for --universal users.

The `RequirementsTxtComparator` was written assuming there is one distribution per name. This changed with the universal resolution, which allows multiple versions or urls for the same package name. The sorting we emitted was incidental, with this change we properly sort these entries by name, version and then url.
@konstin konstin added the enhancement New feature or improvement to existing functionality label Jul 23, 2024
@konstin
Copy link
Member Author

konstin commented Jul 23, 2024

Not sure what's going on with those two CI jobs, but they are not related to changes in this PR

@konstin konstin merged commit bea8bc6 into main Jul 23, 2024
54 of 55 checks passed
@konstin konstin deleted the konsti/stable-sorting-of-requirements-txt-in-univerval-mode branch July 23, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants