diff options
author | Éric Araujo <merwok@netwok.org> | 2011-10-14 15:04:39 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-10-14 15:04:39 (GMT) |
commit | 8022314fc2e8d6a4133c761633ab4e22404319e8 (patch) | |
tree | d45bd35cbb6fa3a6c80beaa329af2c049e35b81a /Lib/packaging | |
parent | d139b994266e0fcc90ac30b49dc9cc047c222961 (diff) | |
download | cpython-8022314fc2e8d6a4133c761633ab4e22404319e8.zip cpython-8022314fc2e8d6a4133c761633ab4e22404319e8.tar.gz cpython-8022314fc2e8d6a4133c761633ab4e22404319e8.tar.bz2 |
Cleanup in packaging: super considered super
Diffstat (limited to 'Lib/packaging')
-rw-r--r-- | Lib/packaging/command/bdist_msi.py | 2 | ||||
-rw-r--r-- | Lib/packaging/compiler/bcppcompiler.py | 2 | ||||
-rw-r--r-- | Lib/packaging/compiler/cygwinccompiler.py | 14 | ||||
-rw-r--r-- | Lib/packaging/compiler/msvc9compiler.py | 2 | ||||
-rw-r--r-- | Lib/packaging/compiler/msvccompiler.py | 2 | ||||
-rw-r--r-- | Lib/packaging/metadata.py | 5 | ||||
-rw-r--r-- | Lib/packaging/tests/pypi_server.py | 2 | ||||
-rw-r--r-- | Lib/packaging/tests/support.py | 2 |
8 files changed, 15 insertions, 16 deletions
diff --git a/Lib/packaging/command/bdist_msi.py b/Lib/packaging/command/bdist_msi.py index eaeb458..9c1791f 100644 --- a/Lib/packaging/command/bdist_msi.py +++ b/Lib/packaging/command/bdist_msi.py @@ -35,7 +35,7 @@ class PyDialog(Dialog): def __init__(self, *args, **kw): """Dialog(database, name, x, y, w, h, attributes, title, first, default, cancel, bitmap=true)""" - Dialog.__init__(self, *args) + super(PyDialog, self).__init__(*args) ruler = self.h - 36 #if kw.get("bitmap", True): # self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin") diff --git a/Lib/packaging/compiler/bcppcompiler.py b/Lib/packaging/compiler/bcppcompiler.py index 477cf93..a4aa2fa 100644 --- a/Lib/packaging/compiler/bcppcompiler.py +++ b/Lib/packaging/compiler/bcppcompiler.py @@ -48,7 +48,7 @@ class BCPPCompiler(CCompiler) : def __init__(self, verbose=0, dry_run=False, force=False): - CCompiler.__init__(self, verbose, dry_run, force) + super(BCPPCompiler, self).__init__(verbose, dry_run, force) # These executables are assumed to all be in the path. # Borland doesn't seem to use any special registry settings to diff --git a/Lib/packaging/compiler/cygwinccompiler.py b/Lib/packaging/compiler/cygwinccompiler.py index 348dbe7..916a1cc 100644 --- a/Lib/packaging/compiler/cygwinccompiler.py +++ b/Lib/packaging/compiler/cygwinccompiler.py @@ -93,8 +93,7 @@ class CygwinCCompiler(UnixCCompiler): exe_extension = ".exe" def __init__(self, verbose=0, dry_run=False, force=False): - - UnixCCompiler.__init__(self, verbose, dry_run, force) + super(CygwinCCompiler, self).__init__(verbose, dry_run, force) status, details = check_config_h() logger.debug("Python's GCC status: %s (details: %s)", status, details) @@ -255,14 +254,14 @@ class CygwinCCompiler(UnixCCompiler): if ext not in (self.src_extensions + ['.rc','.res']): raise UnknownFileError("unknown file type '%s' (from '%s')" % (ext, src_name)) if strip_dir: - base = os.path.basename (base) + base = os.path.basename(base) if ext in ('.res', '.rc'): # these need to be compiled to object files - obj_names.append (os.path.join(output_dir, + obj_names.append(os.path.join(output_dir, base + ext + self.obj_extension)) else: - obj_names.append (os.path.join(output_dir, - base + self.obj_extension)) + obj_names.append(os.path.join(output_dir, + base + self.obj_extension)) return obj_names # the same as cygwin plus some additional parameters @@ -273,8 +272,7 @@ class Mingw32CCompiler(CygwinCCompiler): description = 'MinGW32 compiler' def __init__(self, verbose=0, dry_run=False, force=False): - - CygwinCCompiler.__init__ (self, verbose, dry_run, force) + super(Mingw32CCompiler, self).__init__(verbose, dry_run, force) # ld_version >= "2.13" support -shared so use it instead of # -mdll -static diff --git a/Lib/packaging/compiler/msvc9compiler.py b/Lib/packaging/compiler/msvc9compiler.py index 6ca49c2..539df73 100644 --- a/Lib/packaging/compiler/msvc9compiler.py +++ b/Lib/packaging/compiler/msvc9compiler.py @@ -310,7 +310,7 @@ class MSVCCompiler(CCompiler) : exe_extension = '.exe' def __init__(self, verbose=0, dry_run=False, force=False): - CCompiler.__init__(self, verbose, dry_run, force) + super(MSVCCompiler, self).__init__(verbose, dry_run, force) self.__version = VERSION self.__root = r"Software\Microsoft\VisualStudio" # self.__macros = MACROS diff --git a/Lib/packaging/compiler/msvccompiler.py b/Lib/packaging/compiler/msvccompiler.py index 3d4ac3c..740bc30 100644 --- a/Lib/packaging/compiler/msvccompiler.py +++ b/Lib/packaging/compiler/msvccompiler.py @@ -237,7 +237,7 @@ class MSVCCompiler(CCompiler): exe_extension = '.exe' def __init__(self, verbose=0, dry_run=False, force=False): - CCompiler.__init__(self, verbose, dry_run, force) + super(MSVCCompiler, self).__init__(verbose, dry_run, force) self.__version = get_build_version() self.__arch = get_build_architecture() if self.__arch == "Intel": diff --git a/Lib/packaging/metadata.py b/Lib/packaging/metadata.py index c13acbe..9d3f8ab 100644 --- a/Lib/packaging/metadata.py +++ b/Lib/packaging/metadata.py @@ -28,8 +28,9 @@ try: def __init__(self, source, report_level, halt_level, stream=None, debug=0, encoding='ascii', error_handler='replace'): self.messages = [] - Reporter.__init__(self, source, report_level, halt_level, stream, - debug, encoding, error_handler) + super(SilentReporter, self).__init__( + source, report_level, halt_level, stream, + debug, encoding, error_handler) def system_message(self, level, message, *children, **kwargs): self.messages.append((level, message, children, kwargs)) diff --git a/Lib/packaging/tests/pypi_server.py b/Lib/packaging/tests/pypi_server.py index 72cf8be..377a2b9 100644 --- a/Lib/packaging/tests/pypi_server.py +++ b/Lib/packaging/tests/pypi_server.py @@ -103,7 +103,7 @@ class PyPIServer(threading.Thread): """ # we want to launch the server in a new dedicated thread, to not freeze # tests. - threading.Thread.__init__(self) + super(PyPIServer, self).__init__() self._run = True self._serve_xmlrpc = serve_xmlrpc if static_filesystem_paths is None: diff --git a/Lib/packaging/tests/support.py b/Lib/packaging/tests/support.py index 33d5966..cfcfe01 100644 --- a/Lib/packaging/tests/support.py +++ b/Lib/packaging/tests/support.py @@ -65,7 +65,7 @@ class _TestHandler(logging.handlers.BufferingHandler): # stolen and adapted from test.support def __init__(self): - logging.handlers.BufferingHandler.__init__(self, 0) + super(_TestHandler, self).__init__(0) self.setLevel(logging.DEBUG) def shouldFlush(self): |