summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés Delfino <adelfino@gmail.com>2018-06-08 19:19:21 (GMT)
committerNed Deily <nad@python.org>2018-06-08 19:19:21 (GMT)
commit3b0b90c8c3b8161f0ae9005b83b9b6449d4a8476 (patch)
treec527a128d74795a00f4eea5bc2efe3376b6fd97f
parent4f54867e29af93779922ff23df542f2d5df4c4ee (diff)
downloadcpython-3b0b90c8c3b8161f0ae9005b83b9b6449d4a8476.zip
cpython-3b0b90c8c3b8161f0ae9005b83b9b6449d4a8476.tar.gz
cpython-3b0b90c8c3b8161f0ae9005b83b9b6449d4a8476.tar.bz2
bpo-33800: Fix default argument for parameter dict_type of ConfigParser/RawConfigParser (GH-7494)
-rw-r--r--Doc/library/configparser.rst11
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 5a2178f..c9109eb 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -855,7 +855,7 @@ interpolation if an option used is not defined elsewhere. ::
ConfigParser Objects
--------------------
-.. class:: ConfigParser(defaults=None, dict_type=collections.OrderedDict, allow_no_value=False, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=configparser.DEFAULTSECT, interpolation=BasicInterpolation(), converters={})
+.. class:: ConfigParser(defaults=None, dict_type=dict, allow_no_value=False, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=configparser.DEFAULTSECT, interpolation=BasicInterpolation(), converters={})
The main configuration parser. When *defaults* is given, it is initialized
into the dictionary of intrinsic defaults. When *dict_type* is given, it
@@ -917,6 +917,9 @@ ConfigParser Objects
providing consistent behavior across the parser: non-string
keys and values are implicitly converted to strings.
+ .. versionchanged:: 3.7
+ The default *dict_type* is :class:`dict`, since it now preserves
+ insertion order.
.. method:: defaults()
@@ -1178,7 +1181,7 @@ ConfigParser Objects
RawConfigParser Objects
-----------------------
-.. class:: RawConfigParser(defaults=None, dict_type=collections.OrderedDict, \
+.. class:: RawConfigParser(defaults=None, dict_type=dict, \
allow_no_value=False, *, delimiters=('=', ':'), \
comment_prefixes=('#', ';'), \
inline_comment_prefixes=None, strict=True, \
@@ -1191,6 +1194,10 @@ RawConfigParser Objects
names, and values via its unsafe ``add_section`` and ``set`` methods,
as well as the legacy ``defaults=`` keyword argument handling.
+ .. versionchanged:: 3.7
+ The default *dict_type* is :class:`dict`, since it now preserves
+ insertion order.
+
.. note::
Consider using :class:`ConfigParser` instead which checks types of
the values to be stored internally. If you don't want interpolation, you