Commit 07355321 authored by Philipp Hörist's avatar Philipp Hörist

Dont inherit from object

This is only needed for python2 compatibility
parent 2c7a3e2c
......@@ -493,7 +493,7 @@ def get_rand_number():
return int(binascii.hexlify(os.urandom(6)), 16)
class AckChecker(object):
class AckChecker:
"""
Class for generating rids and generating and checking acknowledgements in
BOSH messages
......@@ -536,7 +536,7 @@ class AckChecker(object):
return self.rid
class KeyStack(object):
class KeyStack:
"""
Class implementing key sequences for BOSH messages
"""
......
......@@ -34,7 +34,7 @@ from .const import Event
log = logging.getLogger('nbxmpp.client_nb')
class NonBlockingClient(object):
class NonBlockingClient:
"""
Client class is XMPP connection mountpoint. Objects for authentication,
network communication, roster, xml parsing ... are plugged to client object.
......
......@@ -41,7 +41,7 @@ DEFAULT_TIMEOUT_SECONDS = 25
XML_DECLARATION = '<?xml version=\'1.0\'?>'
# FIXME: ugly
class Dispatcher(object):
class Dispatcher:
"""
Why is this here - I needed to redefine Dispatcher for BOSH and easiest way
was to inherit original Dispatcher (now renamed to XMPPDispatcher). Trouble
......
......@@ -63,7 +63,7 @@ def get_idlequeue():
return SelectIdleQueue()
class IdleObject(object):
class IdleObject:
"""
Idle listener interface. Listed methods are called by IdleQueue.
"""
......@@ -203,7 +203,7 @@ class IdleCommand(IdleObject):
self._return_result()
class IdleQueue(object):
class IdleQueue:
"""
IdleQueue provide three distinct time based features. Uses select.poll()
......
......@@ -20,7 +20,7 @@ import logging
log = logging.getLogger('nbxmpp.plugin')
class PlugIn(object):
class PlugIn:
"""
Abstract xmpppy plugin infrastructure code, providing plugging in/out and
debugging functionality
......
......@@ -638,7 +638,7 @@ stream_exceptions = {'bad-format': BadFormat,
'xml-not-well-formed': XMLNotWellFormed}
class JID(object):
class JID:
"""
JID can be built from string, modified, compared, serialised into string
"""
......
......@@ -30,7 +30,7 @@ from base64 import b64encode
log = logging.getLogger('nbxmpp.proxy_connectors')
class ProxyConnector(object):
class ProxyConnector:
"""
Interface for proxy-connecting object - when tunnneling XMPP over proxies,
some connecting process usually has to be done before opening stream. Proxy
......
......@@ -32,7 +32,7 @@ def XMLescape(txt):
# replace also FORM FEED and ESC, because they are not valid XML chars
return txt.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace('"', "&quot;").replace('\x0C', "").replace('\x1B', "")
class Node(object):
class Node:
"""
Node class describes syntax of separate XML Node. It have a constructor that
permits node creation from set of "namespace name", attributes and payload
......@@ -471,7 +471,7 @@ class Node(object):
raise AttributeError
class T(object):
class T:
"""
Auxiliary class used to quick access to node's child nodes
"""
......@@ -506,7 +506,7 @@ class NT(T):
return self.node.addChild(attr, payload=[val])
class NodeBuilder(object):
class NodeBuilder:
"""
Builds a Node class minidom from data parsed to it. This class used for two
purposes:
......
......@@ -26,7 +26,7 @@ import unicodedata
from encodings import idna
class ILookupTable(object):
class ILookupTable:
"""
Interface for character lookup classes
"""
......@@ -38,7 +38,7 @@ class ILookupTable(object):
pass
class IMappingTable(object):
class IMappingTable:
"""
Interface for character mapping classes
"""
......@@ -50,14 +50,14 @@ class IMappingTable(object):
pass
class LookupTableFromFunction(object):
class LookupTableFromFunction:
__implements__ = ILookupTable
def __init__(self, in_table_function):
self.lookup = in_table_function
class LookupTable(object):
class LookupTable:
__implements__ = ILookupTable
def __init__(self, table):
......@@ -67,14 +67,14 @@ class LookupTable(object):
return c in self._table
class MappingTableFromFunction(object):
class MappingTableFromFunction:
__implements__ = IMappingTable
def __init__(self, map_table_function):
self.map = map_table_function
class EmptyMappingTable(object):
class EmptyMappingTable:
__implements__ = IMappingTable
def __init__(self, in_table_function):
......@@ -87,7 +87,7 @@ class EmptyMappingTable(object):
return c
class Profile(object):
class Profile:
def __init__(self, mappings=None, normalize=True, prohibiteds=None,
check_unassigneds=True, check_bidi=True):
if mappings is None:
......@@ -161,7 +161,7 @@ class Profile(object):
raise UnicodeError("Violation of BIDI Requirement 3")
class NamePrep(object):
class NamePrep:
"""
Implements preparation of internationalized domain names
......
......@@ -52,7 +52,7 @@ def gattr(obj, attr, default=None):
return default
class SSLWrapper(object):
class SSLWrapper:
"""
Abstract SSLWrapper base class
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment