Changeset 205:e861fc4596ed


Ignore:
Timestamp:
Oct 3, 2016, 8:49:10 AM (4 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
rebase_source:
59eec47f5c9c6add007ba950f0fa04a9d7cb2709
Message:

imported patch py3-component.patch

Location:
wokkel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/component.py

    r176 r205  
    88"""
    99
     10from __future__ import division, absolute_import
     11
    1012from twisted.application import service
    1113from twisted.internet import reactor
    1214from twisted.python import log
     15from twisted.python.compat import unicode
    1316from twisted.words.protocols.jabber.jid import internJID as JID
    1417from twisted.words.protocols.jabber import component, error, xmlstream
     
    103106    allows for one-process XMPP servers.
    104107
    105     @ivar domains: Domains (as C{str}) this component will handle traffic for.
    106     @type domains: C{set}
     108    @ivar domains: Domains (as L{unicode}) this component will handle traffic
     109        for.
     110    @type domains: L{set}
    107111    """
    108112
     
    174178
    175179    @ivar secret: The shared used to authorized incoming component connections.
    176     @type secret: C{unicode}.
     180    @type secret: L{unicode}.
    177181    """
    178182
     
    275279    stanzas they offer for routing.
    276280
    277     A route destination of C{None} adds a default route. Traffic for which no
     281    A route destination of L{None} adds a default route. Traffic for which no
    278282    specific route exists, will be routed to this default route.
    279283
    280284    @ivar routes: Routes based on the host part of JIDs. Maps host names to the
    281285        L{EventDispatcher<twisted.words.xish.utility.EventDispatcher>}s that
    282         should receive the traffic. A key of C{None} means the default route.
    283     @type routes: C{dict}
     286        should receive the traffic. A key of L{None} means the default route.
     287    @type routes: L{dict}
    284288    """
    285289
     
    297301
    298302        @param destination: Destination of the route to be added as a host name
    299                             or C{None} for the default route.
    300         @type destination: C{str} or C{NoneType}
     303                            or L{None} for the default route.
     304        @type destination: L{unicode} or L{NoneType}
    301305
    302306        @param xs: XML Stream to register the route for.
     
    313317
    314318        @param destination: Destination of the route that should be removed.
    315         @type destination: C{str}.
     319        @type destination: L{unicode}
    316320
    317321        @param xs: XML Stream to remove the route for.
  • wokkel/test/test_component.py

    r169 r205  
    55Tests for L{wokkel.component}.
    66"""
     7
     8from __future__ import division, absolute_import
    79
    810from zope.interface.verify import verifyObject
     
    313315        Test routing of a message using the default route.
    314316
    315         The default route is the one with C{None} as its key in the
     317        The default route is the one with L{None} as its key in the
    316318        routing table. It is taken when there is no more specific route
    317319        in the routing table that matches the stanza's destination.
Note: See TracChangeset for help on using the changeset viewer.