email: use dict instead of OrderedDict (GH-11709)

This commit is contained in:
Inada Naoki 2019-02-05 17:05:43 +09:00 committed by GitHub
parent f345170940
commit c95404ff65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -70,7 +70,6 @@ XXX: provide complete list of token types.
import re import re
import urllib # For urllib.parse.unquote import urllib # For urllib.parse.unquote
from string import hexdigits from string import hexdigits
from collections import OrderedDict
from operator import itemgetter from operator import itemgetter
from email import _encoded_words as _ew from email import _encoded_words as _ew
from email import errors from email import errors
@ -720,7 +719,7 @@ class MimeParameters(TokenList):
# to assume the RFC 2231 pieces can come in any order. However, we # 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 # output them in the order that we first see a given name, which gives
# us a stable __str__. # us a stable __str__.
params = OrderedDict() params = {} # Using order preserving dict from Python 3.7+
for token in self: for token in self:
if not token.token_type.endswith('parameter'): if not token.token_type.endswith('parameter'):
continue continue