Index: Lib/configparser.py =================================================================== --- Lib/configparser.py (revision 88694) +++ Lib/configparser.py (working copy) @@ -626,6 +626,8 @@ self._empty_lines_in_values = empty_lines_in_values if interpolation is _UNSET: self._interpolation = self._DEFAULT_INTERPOLATION + elif interpolation is None: + self._interpolation = Interpolation() else: self._interpolation = interpolation self.default_section=default_section Index: Lib/test/test_configparser.py =================================================================== --- Lib/test/test_configparser.py (revision 88694) +++ Lib/test/test_configparser.py (working copy) @@ -858,6 +858,17 @@ cf = self.newconfig() self.assertRaises(ValueError, cf.add_section, self.default_section) +class ConfigParserTestCaseNoInterpolation(BasicTestCase): + config_class = configparser.ConfigParser + interpolation = None + + def test_init_takes_interpolation_none(self): + # Issue 11324 + p = configparser.ConfigParser(interpolation=None) + # The next line raises an exception if ConfigParser doesn't + # handle interpolation=None correctly. + self.assertIs(p.read_string(""), None) + class ConfigParserTestCaseLegacyInterpolation(ConfigParserTestCase): config_class = configparser.ConfigParser interpolation = configparser.LegacyInterpolation() @@ -1327,6 +1338,7 @@ ConfigParserTestCaseNoValue, ConfigParserTestCaseExtendedInterpolation, ConfigParserTestCaseLegacyInterpolation, + ConfigParserTestCaseNoInterpolation, ConfigParserTestCaseTrickyFile, MultilineValuesTestCase, RawConfigParserTestCase,