Author lukasz.langa
Recipients eric.smith, jreese, lukasz.langa, rhettinger, serhiy.storchaka
Date 2018-05-15.04:45:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526359531.57.0.682650639539.issue33504@psf.upfronthosting.co.za>
In-reply-to
Content
I am +1 to changing it to dict for Python 3.8.

This use case is different from `namedtuple._asdict`. The type of the dictionary is for the purpose of internal storage of the parser. Unlike `namedtuple._asdict`, it is not exposed to the user.

The purpose of changing the default to OrderedDict in the past is not documented but implying from its properties we can deduce it was to make minimal edits to .ini files stable. This property will remain unchanged with changing the type back to `dict`.

The history here is this:
- a `dict_type` was introduced by MvL in r52908 (issue 1371075) with the motivation to allow sorting or order preservation (December 2006);
- the default `dict_type` was changed by Raymond to OrderedDict for 3.1 in 0663a1ed793c164fb11d3dd62bebc677e260891e (March 2009); as far as I can tell there was no issue for it when that change was made.

I acknowledge that in https://bugs.python.org/issue32360 Raymond states that "can't just change the default argument for configparser" but I don't see why. ConfigParser doesn't return the dictionary to the user in any API and the new 3.6+ dictionary preserves order just as OrderedDict.
History
Date User Action Args
2018-05-15 04:45:31lukasz.langasetrecipients: + lukasz.langa, rhettinger, eric.smith, jreese, serhiy.storchaka
2018-05-15 04:45:31lukasz.langasetmessageid: <1526359531.57.0.682650639539.issue33504@psf.upfronthosting.co.za>
2018-05-15 04:45:31lukasz.langalinkissue33504 messages
2018-05-15 04:45:31lukasz.langacreate