summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorInada Naoki <methane@users.noreply.github.com>2019-02-05 08:05:43 (GMT)
committerGitHub <noreply@github.com>2019-02-05 08:05:43 (GMT)
commitc95404ff65dab1469dcd1dfec58ba54a8e7e7b3a (patch)
tree28d6fe8154ada025b68ba8b1b8631cfac21186c4 /Lib
parentf34517094049170acc311bac30f68fa67f27a301 (diff)
downloadcpython-c95404ff65dab1469dcd1dfec58ba54a8e7e7b3a.zip
cpython-c95404ff65dab1469dcd1dfec58ba54a8e7e7b3a.tar.gz
cpython-c95404ff65dab1469dcd1dfec58ba54a8e7e7b3a.tar.bz2
email: use dict instead of OrderedDict (GH-11709)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/_header_value_parser.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
index 416da1a..922daa2 100644
--- a/Lib/email/_header_value_parser.py
+++ b/Lib/email/_header_value_parser.py
@@ -70,7 +70,6 @@ XXX: provide complete list of token types.
import re
import urllib # For urllib.parse.unquote
from string import hexdigits
-from collections import OrderedDict
from operator import itemgetter
from email import _encoded_words as _ew
from email import errors
@@ -720,7 +719,7 @@ class MimeParameters(TokenList):
# to assume the RFC 2231 pieces can come in any order. However, we
# output them in the order that we first see a given name, which gives
# us a stable __str__.
- params = OrderedDict()
+ params = {} # Using order preserving dict from Python 3.7+
for token in self:
if not token.token_type.endswith('parameter'):
continue