diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py
--- a/hgext/convert/gnuarch.py
+++ b/hgext/convert/gnuarch.py
@@ -14,7 +14,7 @@ from email.Parser import Parser
 
 class gnuarch_source(converter_source, commandline):
 
-    class gnuarch_rev:
+    class gnuarch_rev(object):
         def __init__(self, rev):
             self.rev = rev
             self.summary = ''
diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -118,7 +118,7 @@ def debugsvnlog(ui, **opts):
     args = decodeargs(sys.stdin.read())
     get_log_child(sys.stdout, *args)
 
-class logstream:
+class logstream(object):
     """Interruptible revision log iterator."""
     def __init__(self, stdout):
         self._stdout = stdout
diff --git a/hgext/convert/transport.py b/hgext/convert/transport.py
--- a/hgext/convert/transport.py
+++ b/hgext/convert/transport.py
@@ -97,7 +97,7 @@ class SvnRaTransport(object):
             self.ra = ra
             svn.ra.reparent(self.ra, self.svn_url.encode('utf8'))
 
-    class Reporter:
+    class Reporter(object):
         def __init__(self, (reporter, report_baton)):
             self._reporter = reporter
             self._baton = report_baton
diff --git a/hgext/gpg.py b/hgext/gpg.py
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -10,7 +10,7 @@ from mercurial import util, commands, ma
 from mercurial import node as hgnode
 from mercurial.i18n import _
 
-class gpg:
+class gpg(object):
     def __init__(self, path, key=None):
         self.path = path
         self.key = (key and " --local-user \"%s\"" % key) or ""
diff --git a/hgext/hgcia.py b/hgext/hgcia.py
--- a/hgext/hgcia.py
+++ b/hgext/hgcia.py
@@ -99,7 +99,7 @@ class ciamsg(object):
         return '\n'.join(msg)
 
     def diffstat(self):
-        class patchbuf:
+        class patchbuf(object):
             def __init__(self):
                 self.lines = []
                 # diffstat is stupid
diff --git a/hgext/inotify/__init__.py b/hgext/inotify/__init__.py
--- a/hgext/inotify/__init__.py
+++ b/hgext/inotify/__init__.py
@@ -23,7 +23,7 @@ def serve(ui, repo, **opts):
     if timeout:
         timeout = float(timeout) * 1e3
 
-    class service:
+    class service(object):
         def init(self):
             try:
                 self.master = server.master(ui, repo, timeout)
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -42,7 +42,7 @@ commands.norepo += " qclone"
 # They must be joinable with queue directory and result in the patch path.
 normname = util.normpath
 
-class statusentry:
+class statusentry(object):
     def __init__(self, rev, name=None):
         if not name:
             fields = rev.split(':', 1)
@@ -191,7 +191,7 @@ class patchheader(object):
                 ci += 1
             del self.comments[ci]
 
-class queue:
+class queue(object):
     def __init__(self, ui, path, patchdir=None):
         self.basepath = path
         self.path = patchdir or os.path.join(path, "patches")
diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -18,12 +18,12 @@ import os, tempfile
 from mercurial import bundlerepo, changegroup, cmdutil, hg, merge, match
 from mercurial import patch, revlog, util, error
 
-class transplantentry:
+class transplantentry(object):
     def __init__(self, lnode, rnode):
         self.lnode = lnode
         self.rnode = rnode
 
-class transplants:
+class transplants(object):
     def __init__(self, path=None, transplantfile=None, opener=None):
         self.path = path
         self.transplantfile = transplantfile
@@ -64,7 +64,7 @@ class transplants:
         del self.transplants[self.transplants.index(transplant)]
         self.dirty = True
 
-class transplanter:
+class transplanter(object):
     def __init__(self, ui, repo):
         self.ui = ui
         self.path = repo.join('transplant')
diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -34,7 +34,7 @@ def tidyprefix(dest, prefix, suffixes):
         raise util.Abort(_('archive prefix contains illegal components'))
     return prefix
 
-class tarit:
+class tarit(object):
     '''write archive to tar file or stream.  can write uncompressed,
     or compress with gzip or bzip2.'''
 
@@ -106,7 +106,7 @@ class tarit:
     def done(self):
         self.z.close()
 
-class tellable:
+class tellable(object):
     '''provide tell method for zipfile.ZipFile when writing to http
     response file object.'''
 
@@ -124,7 +124,7 @@ class tellable:
     def tell(self):
         return self.offset
 
-class zipit:
+class zipit(object):
     '''write archive to zip file or stream.  can write uncompressed,
     or compressed with deflate.'''
 
@@ -156,7 +156,7 @@ class zipit:
     def done(self):
         self.z.close()
 
-class fileit:
+class fileit(object):
     '''write archive as files in directory.'''
 
     def __init__(self, name, prefix, mtime):
diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -36,7 +36,7 @@ def encodeextra(d):
     items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)]
     return "\0".join(items)
 
-class appender:
+class appender(object):
     '''the changelog index must be updated last on disk, so we use this class
     to delay writes to it'''
     def __init__(self, fp, buf):
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1110,7 +1110,7 @@ def walkchangerevs(ui, repo, pats, chang
                 fncache[rev] = matches
                 wanted.add(rev)
 
-    class followfilter:
+    class followfilter(object):
         def __init__(self, onlyfirst=False):
             self.startrev = nullrev
             self.roots = []
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2697,7 +2697,7 @@ def serve(ui, repo, **opts):
         raise error.RepoError(_("There is no Mercurial repository here"
                                 " (.hg not found)"))
 
-    class service:
+    class service(object):
         def init(self):
             util.set_signal_handler()
             self.httpd = server.create_server(baseui, repo)
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -147,7 +147,7 @@ GP_PATCH  = 1 << 0  # we have to run pat
 GP_FILTER = 1 << 1  # there's some copy/rename operation
 GP_BINARY = 1 << 2  # there's a binary patch
 
-class patchmeta:
+class patchmeta(object):
     """Patched file metadata
 
     'op' is the performed operation within ADD, DELETE, RENAME, MODIFY
@@ -232,7 +232,7 @@ def readgitpatch(lr):
 unidesc = re.compile('@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@')
 contextdesc = re.compile('(---|\*\*\*) (\d+)(,(\d+))? (---|\*\*\*)')
 
-class patchfile:
+class patchfile(object):
     def __init__(self, ui, fname, opener, missing=False):
         self.fname = fname
         self.opener = opener
@@ -432,7 +432,7 @@ class patchfile:
         self.rej.append(h)
         return -1
 
-class hunk:
+class hunk(object):
     def __init__(self, desc, num, lr, context, create=False, remove=False):
         self.number = num
         self.desc = desc
@@ -782,7 +782,7 @@ def selectfile(afile_orig, bfile_orig, h
 
     return fname, missing
 
-class linereader:
+class linereader(object):
     # simple class to allow pushing lines back into the input stream
     def __init__(self, fp):
         self.fp = fp
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -165,7 +165,7 @@ def _calcmode(path):
 
 _data = 'data 00manifest.d 00manifest.i 00changelog.d  00changelog.i'
 
-class basicstore:
+class basicstore(object):
     '''base class for local repository stores'''
     def __init__(self, path, opener, pathjoiner):
         self.pathjoiner = pathjoiner
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -749,7 +749,7 @@ def mktempcopy(name, emptyok=False, crea
         raise
     return temp
 
-class atomictempfile:
+class atomictempfile(object):
     """file-like object that atomically updates a file
 
     All writes will be redirected to a temporary copy of the original
diff --git a/mercurial/windows.py b/mercurial/windows.py
--- a/mercurial/windows.py
+++ b/mercurial/windows.py
@@ -20,7 +20,7 @@ def posixfile(name, mode='r', buffering=
         raise WinIOError(err)
 posixfile.__doc__ = osutil.posixfile.__doc__
 
-class winstdout:
+class winstdout(object):
     '''stdout on windows misbehaves if sent through a pipe'''
 
     def __init__(self, fp):