Ticket #6916: application_service_py3.patch

File application_service_py3.patch, 2.0 KB (added by real, 8 years ago)

Minor syntax fixes.

  • twisted/application/service.py

    diff --git twisted/application/service.py twisted/application/service.py
    index 66fef85..786169a 100644
    a sibling). 
    1212
    1313Maintainer: Moshe Zadka
    1414"""
     15from __future__ import print_function,division,absolute_import
    1516
    16 from zope.interface import implements, Interface, Attribute
     17from zope.interface import implementer, Interface, Attribute
    1718
    1819from twisted.python.reflect import namedAny
    1920from twisted.python import components
    class IServiceMaker(Interface): 
    5455        options to desired configuration values.
    5556        """
    5657
    57 
    58 
     58@implementer(IPlugin, IServiceMaker)
    5959class ServiceMaker(object):
    6060    """
    6161    Utility class to simplify the definition of L{IServiceMaker} plugins.
    6262    """
    63     implements(IPlugin, IServiceMaker)
    6463
    6564    def __init__(self, name, module, description, tapname):
    6665        self.name = name
    class IService(Interface): 
    152151        """
    153152
    154153
     154@implementer(IService)
    155155class Service:
    156156    """
    157157    Base class for services.
    class Service: 
    161161    as not serializing this book-keeping information.
    162162    """
    163163
    164     implements(IService)
    165 
    166164    running = 0
    167165    name = None
    168166    parent = None
    class IServiceCollection(Interface): 
    253251        """
    254252
    255253
    256 
     254@implementer(IServiceCollection)
    257255class MultiService(Service):
    258256    """
    259257    Straightforward Service Container.
    class MultiService(Service): 
    264262    will finish.
    265263    """
    266264
    267     implements(IServiceCollection)
    268 
    269265    def __init__(self):
    270266        self.services = []
    271267        self.namedServices = {}
    class IProcess(Interface): 
    346342        """)
    347343
    348344
    349 
     345@implementer(IProcess)
    350346class Process:
    351347    """
    352348    Process running parameters.
    class Process: 
    354350    Sets up uid/gid in the constructor, and has a default
    355351    of C{None} as C{processName}.
    356352    """
    357     implements(IProcess)
    358353    processName = None
    359354
    360355    def __init__(self, uid=None, gid=None):