summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-12-14 04:55:43 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-12-14 04:55:43 -0500
commitca4321bb5833e2daa7bee1a32a3dee37cb49f012 (patch)
tree10d108b3e6dbf9ec64a8cff384dd8d9712c129fa /setuptools/command
parent477fef2d71db14b82d74ea73f4f90e02876d1967 (diff)
downloadpython-setuptools-git-ca4321bb5833e2daa7bee1a32a3dee37cb49f012.tar.gz
Use the modern name for the configparser module
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/easy_install.py8
-rwxr-xr-xsetuptools/command/setopt.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 79f068b1..9ca3b515 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1402,7 +1402,7 @@ def expand_paths(inputs):
def extract_wininst_cfg(dist_filename):
"""Extract configuration data from a bdist_wininst .exe
- Returns a ConfigParser.RawConfigParser, or None
+ Returns a configparser.RawConfigParser, or None
"""
f = open(dist_filename, 'rb')
try:
@@ -1415,7 +1415,7 @@ def extract_wininst_cfg(dist_filename):
return None
f.seek(prepended - 12)
- from setuptools.compat import StringIO, ConfigParser
+ from setuptools.compat import StringIO, configparser
import struct
tag, cfglen, bmlen = struct.unpack("<iii", f.read(12))
@@ -1423,7 +1423,7 @@ def extract_wininst_cfg(dist_filename):
return None # not a valid tag
f.seek(prepended - (12 + cfglen))
- cfg = ConfigParser.RawConfigParser(
+ cfg = configparser.RawConfigParser(
{'version': '', 'target_version': ''})
try:
part = f.read(cfglen)
@@ -1433,7 +1433,7 @@ def extract_wininst_cfg(dist_filename):
# be text, so decode it.
config = config.decode(sys.getfilesystemencoding())
cfg.readfp(StringIO(config))
- except ConfigParser.Error:
+ except configparser.Error:
return None
if not cfg.has_section('metadata') or not cfg.has_section('Setup'):
return None
diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py
index a04d6032..74c7cad8 100755
--- a/setuptools/command/setopt.py
+++ b/setuptools/command/setopt.py
@@ -37,10 +37,10 @@ def edit_config(filename, settings, dry_run=False):
while a dictionary lists settings to be changed or deleted in that section.
A setting of ``None`` means to delete that setting.
"""
- from setuptools.compat import ConfigParser
+ from setuptools.compat import configparser
log.debug("Reading configuration from %s", filename)
- opts = ConfigParser.RawConfigParser()
+ opts = configparser.RawConfigParser()
opts.read([filename])
for section, options in settings.items():
if options is None: