aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsetuptools/command/easy_install.py8
-rwxr-xr-xsetuptools/command/setopt.py4
-rw-r--r--setuptools/compat.py4
-rwxr-xr-xsetuptools/package_index.py6
4 files changed, 11 insertions, 11 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:
diff --git a/setuptools/compat.py b/setuptools/compat.py
index 68ec97d4..f0175a5d 100644
--- a/setuptools/compat.py
+++ b/setuptools/compat.py
@@ -7,7 +7,7 @@ PY2 = not PY3
if PY2:
basestring = basestring
import __builtin__ as builtins
- import ConfigParser
+ import ConfigParser as configparser
from StringIO import StringIO
BytesIO = StringIO
func_code = lambda o: o.func_code
@@ -38,7 +38,7 @@ if PY2:
if PY3:
basestring = str
import builtins
- import configparser as ConfigParser
+ import configparser
from io import StringIO, BytesIO
func_code = lambda o: o.__code__
func_globals = lambda o: o.__globals__
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 7c071457..a26b58bc 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -20,7 +20,7 @@ from distutils.errors import DistutilsError
from setuptools.compat import (
urllib2, httplib, StringIO, HTTPError, urlparse, urlunparse, unquote,
splituser, url2pathname, name2codepoint, unichr, urljoin, urlsplit,
- urlunsplit, ConfigParser, filter, map,
+ urlunsplit, configparser, filter, map,
)
from setuptools.compat import filterfalse
from fnmatch import translate
@@ -945,14 +945,14 @@ class Credential(object):
def __str__(self):
return '%(username)s:%(password)s' % vars(self)
-class PyPIConfig(ConfigParser.ConfigParser):
+class PyPIConfig(configparser.ConfigParser):
def __init__(self):
"""
Load from ~/.pypirc
"""
defaults = dict.fromkeys(['username', 'password', 'repository'], '')
- ConfigParser.ConfigParser.__init__(self, defaults)
+ configparser.ConfigParser.__init__(self, defaults)
rc = os.path.join(os.path.expanduser('~'), '.pypirc')
if os.path.exists(rc):