email: use dict instead of OrderedDict (GH-11709) · python/cpython@c95404f

Original file line numberDiff line numberDiff line change

@@ -70,7 +70,6 @@

7070

import re

7171

import urllib # For urllib.parse.unquote

7272

from string import hexdigits

73-

from collections import OrderedDict

7473

from operator import itemgetter

7574

from email import _encoded_words as _ew

7675

from email import errors

@@ -720,7 +719,7 @@ def params(self):

720719

# to assume the RFC 2231 pieces can come in any order. However, we

721720

# output them in the order that we first see a given name, which gives

722721

# us a stable __str__.

723-

params = OrderedDict()

722+

params = {} # Using order preserving dict from Python 3.7+

724723

for token in self:

725724

if not token.token_type.endswith('parameter'):

726725

continue