bpo-23835: Restore legacy defaults= behavior for RawConfigParser (#3191)
The fix for bpo-23835 fixed ConfigParser behavior in defaults= handling.
Unfortunately, it caused a backwards compatibility regression with
RawConfigParser objects which allow for non-string values.
This commit restores the legacy behavior for RawConfigParser only.
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index c31a7e9..acca647 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -1213,8 +1213,10 @@
default_section=configparser.DEFAULTSECT[, \
interpolation])
- Legacy variant of the :class:`ConfigParser` with interpolation disabled
- by default and unsafe ``add_section`` and ``set`` methods.
+ Legacy variant of the :class:`ConfigParser`. It has interpolation
+ disabled by default and allows for non-string section names, option
+ names, and values via its unsafe ``add_section`` and ``set`` methods,
+ as well as the legacy ``defaults=`` keyword argument handling.
.. note::
Consider using :class:`ConfigParser` instead which checks types of