Skip to content

Commit

Permalink
Remove use of OrderedDict, simplify a str concat (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtoews authored Aug 21, 2023
1 parent 2008f0b commit 2c779d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/wheel/bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import sys
import sysconfig
import warnings
from collections import OrderedDict
from email.generator import BytesGenerator, Generator
from email.policy import EmailPolicy
from glob import iglob
Expand Down Expand Up @@ -152,9 +151,10 @@ def remove_readonly_exc(func, path, exc):
class bdist_wheel(Command):
description = "create a wheel distribution"

supported_compressions = OrderedDict(
[("stored", ZIP_STORED), ("deflated", ZIP_DEFLATED)]
)
supported_compressions = {
"stored": ZIP_STORED,
"deflated": ZIP_DEFLATED,
}

user_options = [
("bdist-dir=", "b", "temporary directory for creating the distribution"),
Expand All @@ -168,7 +168,7 @@ class bdist_wheel(Command):
"keep-temp",
"k",
"keep the pseudo-installation tree around after "
+ "creating the distribution archive",
"creating the distribution archive",
),
("dist-dir=", "d", "directory to put final built distributions in"),
("skip-build", None, "skip rebuilding everything (for testing/debugging)"),
Expand Down
3 changes: 1 addition & 2 deletions src/wheel/wheelfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import re
import stat
import time
from collections import OrderedDict
from io import StringIO, TextIOWrapper
from zipfile import ZIP_DEFLATED, ZipFile, ZipInfo

Expand Down Expand Up @@ -50,7 +49,7 @@ def __init__(self, file, mode="r", compression=ZIP_DEFLATED):
self.parsed_filename.group("namever")
)
self.record_path = self.dist_info_path + "/RECORD"
self._file_hashes = OrderedDict()
self._file_hashes = {}
self._file_sizes = {}
if mode == "r":
# Ignore RECORD and any embedded wheel signatures
Expand Down

0 comments on commit 2c779d9

Please sign in to comment.