Skip to content

Commit 2c779d9

Browse files
authored
Remove use of OrderedDict, simplify a str concat (#561)
1 parent 2008f0b commit 2c779d9

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/wheel/bdist_wheel.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import sys
1515
import sysconfig
1616
import warnings
17-
from collections import OrderedDict
1817
from email.generator import BytesGenerator, Generator
1918
from email.policy import EmailPolicy
2019
from glob import iglob
@@ -152,9 +151,10 @@ def remove_readonly_exc(func, path, exc):
152151
class bdist_wheel(Command):
153152
description = "create a wheel distribution"
154153

155-
supported_compressions = OrderedDict(
156-
[("stored", ZIP_STORED), ("deflated", ZIP_DEFLATED)]
157-
)
154+
supported_compressions = {
155+
"stored": ZIP_STORED,
156+
"deflated": ZIP_DEFLATED,
157+
}
158158

159159
user_options = [
160160
("bdist-dir=", "b", "temporary directory for creating the distribution"),
@@ -168,7 +168,7 @@ class bdist_wheel(Command):
168168
"keep-temp",
169169
"k",
170170
"keep the pseudo-installation tree around after "
171-
+ "creating the distribution archive",
171+
"creating the distribution archive",
172172
),
173173
("dist-dir=", "d", "directory to put final built distributions in"),
174174
("skip-build", None, "skip rebuilding everything (for testing/debugging)"),

src/wheel/wheelfile.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import re
77
import stat
88
import time
9-
from collections import OrderedDict
109
from io import StringIO, TextIOWrapper
1110
from zipfile import ZIP_DEFLATED, ZipFile, ZipInfo
1211

@@ -50,7 +49,7 @@ def __init__(self, file, mode="r", compression=ZIP_DEFLATED):
5049
self.parsed_filename.group("namever")
5150
)
5251
self.record_path = self.dist_info_path + "/RECORD"
53-
self._file_hashes = OrderedDict()
52+
self._file_hashes = {}
5453
self._file_sizes = {}
5554
if mode == "r":
5655
# Ignore RECORD and any embedded wheel signatures

0 commit comments

Comments
 (0)