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 hashes in Pipfile.lock #1664

Closed
ghost opened this issue Mar 11, 2018 · 4 comments
Closed

sort hashes in Pipfile.lock #1664

ghost opened this issue Mar 11, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 11, 2018

I quickly searched the closed issues and don't seem to find something similar:

Is it possible to make pipenv sort the hashes before writing them to the Pipfile.lock file so as there are fewer changes to the file in each installation of a new module?

Thanks for the great project.

@marksteward
Copy link

marksteward commented Mar 11, 2018

Hi, it does since 11.0 (#1529), at least on my machine.

@ghost
Copy link
Author

ghost commented Mar 11, 2018

That's great, I verified that it sorts the hashes in the latest version, thanks for the fast reply!

@ghost ghost closed this as completed Mar 11, 2018
@rconradharris
Copy link
Contributor

rconradharris commented Mar 21, 2018

Looks like 1fa3e2a caused a regression on this bug and #1529.

Code should be:

collected_hashes = list(sorted(set(collected_hashes)))

rconradharris added a commit to rconradharris/pipenv that referenced this issue Mar 21, 2018
The intent has been for hashes to be in a stable order to minimize diff
noise. Commit 1fa3e2a caused a
regression here by converting to a set and back.

Fixes pypa#1529
Fixes pypa#1664
@techalchemy
Copy link
Member

So it seems

@techalchemy techalchemy reopened this Mar 21, 2018
rconradharris added a commit to rconradharris/pipenv that referenced this issue Mar 21, 2018
The intent has been for hashes to be in a stable order to minimize diff
noise. Commit 1fa3e2a caused a
regression here by converting to a set and back.

This patch also removes unecessary `sorted` calls that were added in
4d8e01b. Since sorting is done at the
last possible moment, sorting beforehand is a waste.

Fixes pypa#1529
Fixes pypa#1664
rconradharris added a commit to rconradharris/pipenv that referenced this issue Mar 21, 2018
The intent has been for hashes to be in a stable order to minimize diff
noise. Commit 1fa3e2a caused a
regression here by converting to a set and back.

This patch also removes unecessary `sorted` calls that were added in
4d8e01b. Since sorting is done at the
last possible moment, sorting beforehand is a waste.

Fixes pypa#1529
Fixes pypa#1664
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants