Changeset 198:7110457aff51 for wokkel


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

imported patch py3-disco.patch

Location:
wokkel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/disco.py

    r166 r198  
    1111"""
    1212
     13from __future__ import division, absolute_import
     14
    1315from twisted.internet import defer
     16from twisted.python.compat import iteritems, unicode
    1417from twisted.words.protocols.jabber import error, jid
    1518from twisted.words.xish import domish
     
    364367            }
    365368
    366     _verbRequestMap = dict(((v, k) for k, v in _requestVerbMap.iteritems()))
     369    _verbRequestMap = dict(((v, k) for k, v in iteritems(_requestVerbMap)))
    367370
    368371    def __init__(self, verb=None, nodeIdentifier='',
  • wokkel/test/test_disco.py

    r103 r198  
    66"""
    77
    8 from zope.interface import implements
     8from __future__ import division, absolute_import
     9
     10from zope.interface import implementer
    911
    1012from twisted.internet import defer
     
    847849        ]
    848850
     851        @implementer(disco.IDisco)
    849852        class DiscoResponder(XMPPHandler):
    850             implements(disco.IDisco)
    851853
    852854            def getDiscoInfo(self, requestor, target, nodeIdentifier):
     
    874876        ]
    875877
     878        @implementer(disco.IDisco)
    876879        class DiscoResponder(XMPPHandler):
    877             implements(disco.IDisco)
    878880
    879881            def getDiscoInfo(self, requestor, target, nodeIdentifier):
     
    898900        discoItems = [disco.DiscoItem(JID('example.com'), 'test', 'Test node')]
    899901
     902        @implementer(disco.IDisco)
    900903        class DiscoResponder(XMPPHandler):
    901             implements(disco.IDisco)
    902904
    903905            def getDiscoItems(self, requestor, target, nodeIdentifier):
     
    922924        discoItems = [disco.DiscoItem(JID('example.com'), 'test', 'Test node')]
    923925
     926        @implementer(disco.IDisco)
    924927        class DiscoResponder(XMPPHandler):
    925             implements(disco.IDisco)
    926928
    927929            def getDiscoItems(self, requestor, target, nodeIdentifier):
Note: See TracChangeset for help on using the changeset viewer.