Ticket #5837: implementer-news.patch

File implementer-news.patch, 1.6 KB (added by Vladimir Perić, 9 years ago)
  • twisted/news/database.py

    diff --git twisted/news/database.py twisted/news/database.py
    index b5a1f22..137736a 100644
    import os 
    1111import StringIO
    1212from email.Message import Message
    1313from email.Generator import Generator
    14 from zope.interface import implementer, Interface
     14from zope.interface import implements, Interface
    1515
    1616from twisted.news.nntp import NNTPError
    1717from twisted.mail import smtp
    class _ModerationMixin: 
    279279
    280280
    281281
    282 @implementer(INewsStorage)
    283282class PickleStorage(_ModerationMixin):
    284283    """
    285284    A trivial NewsStorage implementation using pickles
    class PickleStorage(_ModerationMixin): 
    288287    real applications.  Consider yourself warned!
    289288    """
    290289
     290    implements(INewsStorage)
     291
    291292    sharedDBs = {}
    292293
    293294    def __init__(self, filename, groups=None, moderators=(),
    class Group: 
    497498        self.articles = {}
    498499
    499500
    500 @implementer(INewsStorage)
    501501class NewsShelf(_ModerationMixin):
    502502    """
    503503    A NewStorage implementation using Twisted's dirdbm persistence module.
    504504    """
    505505
     506    implements(INewsStorage)
     507
    506508    def __init__(self, mailhost, path, sender=None):
    507509        """
    508510        @param mailhost: A C{str} giving the mail exchange host which will
    class NewsShelf(_ModerationMixin): 
    730732            return defer.succeed((index, a.getHeader('Message-ID'), StringIO.StringIO(a.body)))
    731733
    732734
    733 @implementer(INewsStorage)
    734735class NewsStorageAugmentation:
    735736    """
    736737    A NewsStorage implementation using Twisted's asynchronous DB-API
    737738    """
    738739
     740    implements(INewsStorage)
     741
    739742    schema = """
    740743
    741744    CREATE TABLE groups (