Ignore:
Timestamp:
Jan 22, 2012, 2:51:25 PM (10 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Message:

Cleanups leading up to Wokkel 0.7.0.

As we now depend on Twisted 10.0.0 or higher, the following classes and
interfaces were deprecated:

This also resolves all Pyflakes warnings, changes links for www.xmpp.org to
xmpp.org and fixes the copyright notice in LICENSE to include 2012.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/component.py

    r96 r165  
    1515from twisted.words.xish import domish
    1616
    17 try:
    18     #from twisted.words.protocols.jabber.xmlstream import XMPPHandler
    19     from twisted.words.protocols.jabber.xmlstream import XMPPHandlerCollection
    20 except ImportError:
    21     #from wokkel.subprotocols import XMPPHandler
    22     from wokkel.subprotocols import XMPPHandlerCollection
    23 
    24 try:
    25     from twisted.words.protocols.jabber.xmlstream import XmlStreamServerFactory
    26 except ImportError:
    27     from wokkel.compat import XmlStreamServerFactory
    28 
    2917from wokkel.generic import XmlPipe
    3018from wokkel.subprotocols import StreamManager
     
    7967
    8068
    81 class InternalComponent(XMPPHandlerCollection, service.Service):
     69class InternalComponent(xmlstream.XMPPHandlerCollection, service.Service):
    8270    """
    8371    Component service that connects directly to a router.
     
    9280
    9381    def __init__(self, router, domain=None):
    94         XMPPHandlerCollection.__init__(self)
     82        xmlstream.XMPPHandlerCollection.__init__(self)
    9583
    9684        self._router = router
     
    138126        Add a new handler and connect it to the stream.
    139127        """
    140         XMPPHandlerCollection.addHandler(self, handler)
     128        xmlstream.XMPPHandlerCollection.addHandler(self, handler)
    141129
    142130        if self.xmlstream:
     
    323311
    324312
    325 class XMPPComponentServerFactory(XmlStreamServerFactory):
     313class XMPPComponentServerFactory(xmlstream.XmlStreamServerFactory):
    326314    """
    327315    XMPP Component Server factory.
     
    341329            return ListenComponentAuthenticator(self.secret)
    342330
    343         XmlStreamServerFactory.__init__(self, authenticatorFactory)
     331        xmlstream.XmlStreamServerFactory.__init__(self, authenticatorFactory)
    344332        self.addBootstrap(xmlstream.STREAM_CONNECTED_EVENT,
    345333                          self.makeConnection)
Note: See TracChangeset for help on using the changeset viewer.