Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits: 07355321 by Philipp Hörist at 2018-11-27T19:16:24Z Dont inherit from object
This is only needed for python2 compatibility
- - - - -
10 changed files:
- nbxmpp/bosh.py - nbxmpp/client_nb.py - nbxmpp/dispatcher_nb.py - nbxmpp/idlequeue.py - nbxmpp/plugin.py - nbxmpp/protocol.py - nbxmpp/proxy_connectors.py - nbxmpp/simplexml.py - nbxmpp/stringprepare.py - nbxmpp/tls_nb.py
Changes:
===================================== nbxmpp/bosh.py ===================================== @@ -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 """
===================================== nbxmpp/client_nb.py ===================================== @@ -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.
===================================== nbxmpp/dispatcher_nb.py ===================================== @@ -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
===================================== nbxmpp/idlequeue.py ===================================== @@ -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()
===================================== nbxmpp/plugin.py ===================================== @@ -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
===================================== nbxmpp/protocol.py ===================================== @@ -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 """
===================================== nbxmpp/proxy_connectors.py ===================================== @@ -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
===================================== nbxmpp/simplexml.py ===================================== @@ -32,7 +32,7 @@ def XMLescape(txt): # replace also FORM FEED and ESC, because they are not valid XML chars return txt.replace("&", "&").replace("<", "<").replace(">", ">").replace('"', """).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:
===================================== nbxmpp/stringprepare.py ===================================== @@ -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
===================================== nbxmpp/tls_nb.py ===================================== @@ -52,7 +52,7 @@ def gattr(obj, attr, default=None): return default
-class SSLWrapper(object): +class SSLWrapper: """ Abstract SSLWrapper base class """
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/073553215d153ff1f3991a2234f...