]> granicus.if.org Git - python/commitdiff
Cleanup in packaging: super considered super
authorÉric Araujo <merwok@netwok.org>
Fri, 14 Oct 2011 15:04:39 +0000 (17:04 +0200)
committerÉric Araujo <merwok@netwok.org>
Fri, 14 Oct 2011 15:04:39 +0000 (17:04 +0200)
Lib/packaging/command/bdist_msi.py
Lib/packaging/compiler/bcppcompiler.py
Lib/packaging/compiler/cygwinccompiler.py
Lib/packaging/compiler/msvc9compiler.py
Lib/packaging/compiler/msvccompiler.py
Lib/packaging/metadata.py
Lib/packaging/tests/pypi_server.py
Lib/packaging/tests/support.py

index eaeb458a8fc27bcf1388dc9fc24d32f29387dd20..9c1791febaa6a675b8dfc402664f4abe319c0191 100644 (file)
@@ -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")
index 477cf93d2e4c4dc1512f7abadeec9ce4c968d0b1..a4aa2fa36d753f3935920412114611dfcc430128 100644 (file)
@@ -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
index 348dbe782fa78ae055479ef4cc240c9e03826bf2..916a1ccf627de6a0773632b99dd751ba496f8840 100644 (file)
@@ -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
index 6ca49c21b24d2cae23ef12297c14e8c809360dd5..539df7313b5628600153a79b49214aa210a859fb 100644 (file)
@@ -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
index 3d4ac3c60b14644d259b40194edfd1517089bf7b..740bc30065179c825df5282f48406abd500fe9dd 100644 (file)
@@ -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":
index c13acbe3acf372098bed8dfea96bd8b89492c4c5..9d3f8abe712b96f492f49f6072eaa2b26a9b8ce0 100644 (file)
@@ -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))
index 72cf8bed46d6552a57132ff66874238dedff5e54..377a2b9bc69a537a3036d3dc0c63f4f4e039fb36 100644 (file)
@@ -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:
index 33d59668b352b4566176c1763838bbf6a142ea13..cfcfe012dc619b5cc15a166c43cf4d086b4877e5 100644 (file)
@@ -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):