# HG changeset patch # User Thomas Arendsen Hein # Date 1309352400 -7200 # Node ID a7d5816087a9c02918f65c0a10efd5eaf212d6dc # Parent b071cd58af50cffcb2dc30ef8887b3b449fb1203 classes: fix class style problems found by b071cd58af50 This makes test-wireprotocol.py work on Python 2.4 diff -r b071cd58af50 -r a7d5816087a9 doc/hgmanpage.py --- a/doc/hgmanpage.py Wed Jun 29 13:45:51 2011 +0200 +++ b/doc/hgmanpage.py Wed Jun 29 15:00:00 2011 +0200 @@ -104,7 +104,7 @@ self.output = visitor.astext() -class Table: +class Table(object): def __init__(self): self._rows = [] self._options = ['center'] @@ -300,7 +300,7 @@ pass def list_start(self, node): - class enum_char: + class enum_char(object): enum_style = { 'bullet' : '\\(bu', 'emdash' : '\\(em', diff -r b071cd58af50 -r a7d5816087a9 mercurial/byterange.py --- a/mercurial/byterange.py Wed Jun 29 13:45:51 2011 +0200 +++ b/mercurial/byterange.py Wed Jun 29 15:00:00 2011 +0200 @@ -64,7 +64,7 @@ # HTTP's Range Not Satisfiable error raise RangeError('Requested Range Not Satisfiable') -class RangeableFileObject: +class RangeableFileObject(object): """File object wrapper to enable raw range handling. This was implemented primarilary for handling range specifications for file:// urls. This object effectively makes diff -r b071cd58af50 -r a7d5816087a9 mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py Wed Jun 29 13:45:51 2011 +0200 +++ b/mercurial/hgweb/server.py Wed Jun 29 15:00:00 2011 +0200 @@ -251,7 +251,7 @@ if hasattr(os, "fork"): _mixin = SocketServer.ForkingMixIn else: - class _mixin: + class _mixin(object): pass def openlog(opt, default): diff -r b071cd58af50 -r a7d5816087a9 mercurial/keepalive.py --- a/mercurial/keepalive.py Wed Jun 29 13:45:51 2011 +0200 +++ b/mercurial/keepalive.py Wed Jun 29 15:00:00 2011 +0200 @@ -124,7 +124,7 @@ HANDLE_ERRORS = 1 else: HANDLE_ERRORS = 0 -class ConnectionManager: +class ConnectionManager(object): """ The connection manager must be able to: * keep track of all existing @@ -187,7 +187,7 @@ else: return dict(self._hostmap) -class KeepAliveHandler: +class KeepAliveHandler(object): def __init__(self): self._cm = ConnectionManager() @@ -705,7 +705,7 @@ def test_timeout(url): global DEBUG dbbackup = DEBUG - class FakeLogger: + class FakeLogger(object): def debug(self, msg, *args): print msg % args info = warning = error = debug diff -r b071cd58af50 -r a7d5816087a9 mercurial/patch.py --- a/mercurial/patch.py Wed Jun 29 13:45:51 2011 +0200 +++ b/mercurial/patch.py Wed Jun 29 15:00:00 2011 +0200 @@ -1009,7 +1009,7 @@ def new(self, fuzz=0, toponly=False): return self.fuzzit(self.b, fuzz, toponly) -class binhunk: +class binhunk(object): 'A binary patch file. Only understands literals so far.' def __init__(self, lr): self.text = None diff -r b071cd58af50 -r a7d5816087a9 tests/test-batching.py --- a/tests/test-batching.py Wed Jun 29 13:45:51 2011 +0200 +++ b/tests/test-batching.py Wed Jun 29 15:00:00 2011 +0200 @@ -85,7 +85,7 @@ # server side # equivalent of wireproto's global functions -class server: +class server(object): def __init__(self, local): self.local = local def _call(self, name, args): diff -r b071cd58af50 -r a7d5816087a9 tests/test-wireprotocol.py --- a/tests/test-wireprotocol.py Wed Jun 29 13:45:51 2011 +0200 +++ b/tests/test-wireprotocol.py Wed Jun 29 15:00:00 2011 +0200 @@ -1,6 +1,6 @@ from mercurial import wireproto -class proto(): +class proto(object): def __init__(self, args): self.args = args def getargs(self, spec): @@ -21,7 +21,7 @@ yield wireproto.todict(name=mangle(name)), f yield unmangle(f.value) -class serverrepo(): +class serverrepo(object): def greet(self, name): return "Hello, " + name