]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
email: use dict instead of OrderedDict (GH-11709)
authorInada Naoki <methane@users.noreply.github.com>
Tue, 5 Feb 2019 08:05:43 +0000 (17:05 +0900)
committerGitHub <noreply@github.com>
Tue, 5 Feb 2019 08:05:43 +0000 (17:05 +0900)
Lib/email/_header_value_parser.py

index 416da1a80d9c5ff1e82f8742e7ef4dc89ea58319..922daa2560f0061212baaa4df0982ceb69c539d0 100644 (file)
@@ -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