Skip to content

Commit 65e64e7

Browse files
committed
upload: avoid set(...) for attestations
Prevents subtle ordering bugs. Signed-off-by: William Woodruff <[email protected]>
1 parent 4d0274b commit 65e64e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

twine/commands/upload.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ def _split_inputs(
113113
``dist-path -> [attestation-path]``.
114114
"""
115115
signatures = {os.path.basename(i): i for i in fnmatch.filter(inputs, "*.asc")}
116-
attestations = set(fnmatch.filter(inputs, "*.*.attestation"))
116+
attestations = fnmatch.filter(inputs, "*.*.attestation")
117117
dists = [
118-
dist for dist in inputs if dist not in (set(signatures.values()) | attestations)
118+
dist
119+
for dist in inputs
120+
if dist not in (set(signatures.values()) | set(attestations))
119121
]
120122

121123
attestations_by_dist = {}

0 commit comments

Comments
 (0)