bpo-33504: Migrate configparser from OrderedDict to dict. (#6819)

With 3.7+, dictionary are ordered by design.  Configparser still uses
collections.OrderedDict, which is unnecessary.  This updates the module
to use the standard dict implementation by default, and changes the
docs and tests to match.
This commit is contained in:
John Reese 2018-06-05 16:31:33 -07:00 committed by Łukasz Langa
parent 5f3d04fa4e
commit 3a5b0d8988
5 changed files with 15 additions and 43 deletions

View file

@ -1109,7 +1109,7 @@ class RawConfigParserTestCase(BasicTestCase, unittest.TestCase):
self.assertEqual(cf.get(123, 'this is sick'), True)
if cf._dict is configparser._default_dict:
# would not work for SortedDict; only checking for the most common
# default dictionary (OrderedDict)
# default dictionary (dict)
cf.optionxform = lambda x: x
cf.set('non-string', 1, 1)
self.assertEqual(cf.get('non-string', 1), 1)