Index: Lib/idlelib/configHandler.py =================================================================== --- Lib/idlelib/configHandler.py (revision 87045) +++ Lib/idlelib/configHandler.py (working copy) @@ -21,23 +21,23 @@ import sys from idlelib import macosxSupport -from configparser import ConfigParser, NoOptionError, NoSectionError +from configparser import SafeConfigParser, NoOptionError, NoSectionError class InvalidConfigType(Exception): pass class InvalidConfigSet(Exception): pass class InvalidFgBg(Exception): pass class InvalidTheme(Exception): pass -class IdleConfParser(ConfigParser): +class IdleConfParser(SafeConfigParser): """ - A ConfigParser specialised for idle configuration file handling + A SafeConfigParser specialised for idle configuration file handling """ def __init__(self, cfgFile, cfgDefaults=None): """ cfgFile - string, fully specified configuration file name """ self.file=cfgFile - ConfigParser.__init__(self,defaults=cfgDefaults) + super().__init__(defaults=cfgDefaults) def Get(self, section, option, type=None, default=None, raw=False): """ Index: Lib/distutils/config.py =================================================================== --- Lib/distutils/config.py (revision 87045) +++ Lib/distutils/config.py (working copy) @@ -5,7 +5,7 @@ """ import os import sys -from configparser import ConfigParser +from configparser import SafeConfigParser from distutils.cmd import Command @@ -62,7 +62,7 @@ repository = self.repository or self.DEFAULT_REPOSITORY realm = self.realm or self.DEFAULT_REALM - config = ConfigParser() + config = SafeConfigParser() config.read(rc) sections = config.sections() if 'distutils' in sections: Index: Lib/distutils/dist.py =================================================================== --- Lib/distutils/dist.py (revision 87045) +++ Lib/distutils/dist.py (working copy) @@ -343,7 +343,7 @@ return files def parse_config_files(self, filenames=None): - from configparser import ConfigParser + from configparser import SafeConfigParser if filenames is None: filenames = self.find_config_files() @@ -351,7 +351,7 @@ if DEBUG: self.announce("Distribution.parse_config_files():") - parser = ConfigParser() + parser = SafeConfigParser() for filename in filenames: if DEBUG: self.announce(" reading %s" % filename) @@ -366,7 +366,7 @@ opt = opt.replace('-', '_') opt_dict[opt] = (filename, val) - # Make the ConfigParser forget everything (so we retain + # Make the SafeConfigParser forget everything (so we retain # the original filenames that options come from) parser.__init__() Index: Lib/logging/config.py =================================================================== --- Lib/logging/config.py (revision 87045) +++ Lib/logging/config.py (working copy) @@ -61,7 +61,7 @@ """ import configparser - cp = configparser.ConfigParser(defaults) + cp = configparser.SafeConfigParser(defaults) if hasattr(fname, 'readline'): cp.read_file(fname) else: