Changeset 24673

Show
Ignore:
Timestamp:
09/02/2008 11:51:38 AM (10 months ago)
Author:
therve
Message:
Remove tap support, clean API links.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/run-plugin-1490-2/doc/core/howto/tap.xhtml

    r23767 r24673  
    137137    class="API" base="twisted.application.service">IService</code> 
    138138    implementation which will be run by <code class="shell">twistd</code>, 
    139     in this case an <code class="API" base="twisted.application"> 
    140     internet.TCPServer</code>. You can read more about services in the <a 
    141     href="application.xhtml">application howto</a>: for example, it describes 
    142     <a href="application.xhtml#services-provided">the list of services 
     139    in this case an 
     140    <code class="API" base="twisted.application">internet.TCPServer</code>. You 
     141    can read more about services in the <a href="application.xhtml">application 
     142    howto</a>: for example, it describes <a 
     143    href="application.xhtml#services-provided">the list of services 
    143144    provided</a> and how to build <a 
    144145    href="application.xhtml#service-collection">service collections</a>. 
     
    148149    <code class="python">MyServiceMaker</code> because <code class="shell"> 
    149150    twistd run</code> accepts the name of an object that <strong>provides 
    150     </strong> <code class="API" base="twisted.application.service"> 
    151     ISimpleServiceMaker</code>, not the name of an object that <strong> 
    152     implements</strong> it. 
     151    </strong> 
     152    <code class="API" base="twisted.application.service">ISimpleServiceMaker</code>, 
     153    not the name of an object that <strong> implements</strong> it. 
    153154</p> 
    154155 
    155156<p> 
    156157    To run this service, you call the run plugin with twistd, passing the fully 
    157     qualified named of your object providing <code class="API" base="twisted.application.service"> 
    158     ISimpleServiceMaker</code>. 
     158    qualified named of your object providing 
     159    <code class="API" base="twisted.application.service">ISimpleServiceMaker</code>. 
    159160</p> 
    160161 
  • branches/run-plugin-1490-2/twisted/conch/tap.py

    r24610 r24673  
    66""" 
    77 
    8 from zope.interface import moduleProvides 
    9  
    108from twisted.conch import checkers, unix 
    119from twisted.conch.openssh_compat import factory 
     
    1311from twisted.python import usage 
    1412from twisted.application import strports 
    15 from twisted.application.service import ISimpleServiceMaker 
    16  
    17  
    18  
    19 moduleProvides(ISimpleServiceMaker) 
    2013 
    2114 
  • branches/run-plugin-1490-2/twisted/mail/tap.py

    r24610 r24673  
    88 
    99import os 
    10  
    11 from zope.interface import moduleProvides 
    1210 
    1311from twisted.mail import mail 
     
    2119from twisted.cred import checkers 
    2220from twisted.application import internet 
    23 from twisted.application.service import ISimpleServiceMaker 
    24  
    25  
    26  
    27 moduleProvides(ISimpleServiceMaker) 
    2821 
    2922 
  • branches/run-plugin-1490-2/twisted/names/tap.py

    r24610 r24673  
    88import os, traceback 
    99 
    10 from zope.interface import moduleProvides 
    11  
    1210from twisted.python import usage 
    1311from twisted.names import dns 
     
    1816from twisted.names import secondary 
    1917 
    20  
    21 moduleProvides(service.ISimpleServiceMaker) 
    2218 
    2319 
  • branches/run-plugin-1490-2/twisted/plugins/twisted_run.py

    r24610 r24673  
    7878            raise SystemExit("'%s' doesn't provide the ISimpleServiceMaker " 
    7979                             "interface" % (options['maker'],)) 
    80         opts = getattr(maker, 'options', None) 
    81         if opts is not None: 
    82             subOptions = opts() 
    83         else: 
    84             # Compatibility with tap module 
    85             subOptions = maker.Options() 
     80        subOptions = maker.options() 
    8681        subOptions.parseOptions(options['maker_options']) 
    8782        return maker.makeService(subOptions) 
  • branches/run-plugin-1490-2/twisted/test/test_twistd.py

    r24610 r24673  
    10781078 
    10791079 
    1080 class StubTAP(object): 
    1081     """ 
    1082     A fake TAP module to be run by L{RunPlugin}. 
    1083     """ 
    1084     implements(service.ISimpleServiceMaker) 
    1085     Options = StubOptions 
    1086  
    1087     def makeService(self, options): 
    1088         """ 
    1089         Create a dummy service and save options in C{self.savedOptions}. 
    1090         """ 
    1091         self.savedOptions = options 
    1092         self.service = service.Service() 
    1093         return self.service 
    1094  
    1095  
    1096  
    10971080class RunPluginTests(unittest.TestCase): 
    10981081    """ 
    10991082    Tests for the twistd L{RunPlugin}. 
    1100  
    1101     @cvar stubTAP: a TAP module to use during tests. 
    1102     @type stubTAP: L{StubTAP} 
    11031083 
    11041084    @cvar stubService: a service to use during tests. 
     
    11151095        self.plugin = RunPlugin() 
    11161096        cls = self.__class__ 
    1117         cls.stubTAP = StubTAP() 
    11181097        cls.stubService = StubServiceMaker() 
    11191098        directlyProvides(cls.stubService, service.ISimpleServiceMaker) 
     
    11271106        """ 
    11281107        cls = self.__class__ 
    1129         cls.stubTAP = None 
    11301108        cls.stubService = None 
    11311109 
     
    12211199 
    12221200 
    1223     def test_tapModule(self): 
    1224         """ 
    1225         L{RunPlugin.makeService} supports running TAP modules, the difference 
    1226         being that the options attribute has a different name. 
    1227         """ 
    1228         opt = self.plugin.options() 
    1229         opt.parseArgs("%s.%s.stubTAP" % ( 
    1230             self.__module__, self.__class__.__name__)) 
    1231         srv = self.plugin.makeService(opt) 
    1232         self.assertIdentical(srv, self.stubTAP.service) 
    1233         self.assertEquals(self.stubTAP.savedOptions, {'foo': '1234'}) 
    1234  
    1235  
    12361201    def test_foundInPlugins(self): 
    12371202        """ 
  • branches/run-plugin-1490-2/twisted/web/tap.py

    r24610 r24673  
    77 
    88import os 
    9  
    10 from zope.interface import moduleProvides 
    119 
    1210from twisted.web import server, static, twcgi, script, demo, distrib, trp 
     
    1513from twisted.spread import pb 
    1614from twisted.application import internet, service, strports 
    17  
    18  
    19  
    20 moduleProvides(service.ISimpleServiceMaker) 
    2115 
    2216