Skip to content

Conversation

@rpurdie
Copy link
Contributor

@rpurdie rpurdie commented May 31, 2021

globbing uses os.listdir() which returns order on disk which is unsorted.
Ultimately this leads to random ordering of License-File entries in PKG-INFO
and means the resulting output isn't deterministic.

Adding a sort fixes that. Switch to glob instead ot iglob since sorted()
removes the benefit of an iterator.

#2691

Signed-off-by: Richard Purdie richard.purdie@linuxfoundation.org

Summary of changes

Closes

Pull Request Checklist

globbing uses os.listdir() which returns order on disk which is unsorted. Ultimately this leads to random ordering of License-File entries in PKG-INFO and means the resulting output isn't deterministic. Adding a sort fixes that. Switch to glob instead ot iglob since sorted() removes the benefit of an iterator. pypa#2691 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
@jaraco
Copy link
Member

jaraco commented Jun 2, 2021

Switch to glob instead ot iglob since sorted()
removes the benefit of an iterator.

I think I'd still prefer an iterator.

Can you create a test to capture this expectation?

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaraco jaraco merged commit e345d8e into pypa:main Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants