Zope 3 - Developer report tools: XXX/TODO comments

Generated on Wed, 07 Feb 2007 04:01:28 CET


Summary

There are currently 720 XXX/TODO comments.


Listing

  1. File: ./../src/z3checkins/tests/test_message.py:212
            # TODO: The Zope 3 checkin mailing list uses a non-standard format.
            # This test checks the compatibility hacks planted in the code.
            # I hope that they will be removed in the future.
            svn_msg4 = open_test_data("svn_msg4.txt")
    
  2. File: ./../src/z3checkins/browser.py:36
            if data.has_key('data'): # TODO should we bark if no data is given?
                msg_raw = data['data']
                parser = zope.component.getUtility(IMessageParser)
                if msg_raw.startswith("From "):
    
  3. File: ./../src/z3checkins/browser.py:49
                                # TODO: should handle RFC-2047
                                dc.title = unicode(message.subject)
                                dc.created = message.date
                        except DuplicationError:
    
  4. File: ./../src/z3checkins/browser.py:304
            # TODO This method is rather bloated and hard to understand.
            text = self.context.body.replace('\r', '') \
                                    .replace('&', '&') \
                                    .replace('<', '<') \
    
  5. File: ./../src/z3checkins/browser.py:402
            # TODO: find out the actual encoding instead of assuming UTF-8
            return unicode(text, 'UTF-8', 'replace')
    
        def mark_whitespace(self, line, tab=('>', '-'), trail='.'):
    
  6. File: ./../src/zodbcode/tests/_pmtest.py:16
    # XXX why aren't modules pickleable?
    # import os
    # from xml import sax
    
    
  7. File: ./../src/zodbcode/tests/test_module.py:125
            # XXX somehow objects are getting registered here, but not
            # modified.  need to figure out what is going wrong, but for
            # now just abort the transaction.
            ##assert not cn._registered
    
  8. File: ./../src/zodbcode/tests/test_class.py:23
        # TODO
        # test classes with getstate and setstate
        # make sure class invalidation works correctly
    
    
  9. File: ./../src/zodbcode/patch.py:120
                # XXX Hack: Use _p_newstate for persistent classes, because
                # a persistent class's persistent state is a fairly limited
                # subset of the dict and we really want to replace everything.
                if hasattr(self._replace, "_p_newstate"):
    
  10. File: ./../src/zodbcode/patch.py:221
                # XXX Is this safe in all cases?
                oid = getattr(obj, "_p_oid", marker)
                if oid is marker:
                    return None
    
  11. File: ./../src/zodbcode/patch.py:264
            # XXX Will this object always have an __module__?
            if obj.__module__ == self._module_name:
                # Save an external type registered through registerWrapper
                objtype = type(obj)
    
  12. File: ./../src/zodbcode/patch.py:392
        # XXX should we try to handle descriptors?  If it looks like a
        # descriptor, try calling it and passing the class object?
    
        classTypes = {
    
  13. File: ./../src/zodbcode/class_.py:25
    # XXX There is a lot of magic here to give classes and instances
    # separate sets of attributes.  This code should be documented, as it
    # it quite delicate, and it should be move to a separate module.
    
    
  14. File: ./../src/zodbcode/class_.py:266
            # XXX _p_invalidate
    
            # Create a descriptor that calls _p_activate() when _p_jar is set.
            inst_jar_descr = findattr(cls, "_p_jar", None)
    
  15. File: ./../src/zodbcode/class_.py:291
            # XXX I'm not sure I understand this code any more.
            super_meth = super(PersistentClassMetaClass, cls).__getattribute__
    
            # If we are initializing the class, don't trying to check variables
    
  16. File: ./../src/zodbcode/class_.py:306
        # XXX There needs to be an _p_changed flag so that classes get
        # registered with the txn when they are modified.
    
        def __setattr__(cls, attr, val):
    
  17. File: ./../src/zodbcode/class_.py:322
                # XXX what should happen with these?
                return
            super(PersistentClassMetaClass, cls).__delattr__(attr)
    
    
  18. File: ./../src/zodbcode/class_.py:346
                # XXX The following test isn't right because overriding
                # must be allowed, but I haven't figured that out yet.
                # __getstate__ and __setstate__ might be overridden
                # __implements__ might be overridden
    
  19. File: ./../src/zodbcode/class_.py:362
        # XXX Should the object get marked as a ghost when it is, in fact,
        # not a ghost?  The most obvious answer is no.  But if we don't
        # then we need some other attribute that can be used to handle
        # invalidations of classes and make _p_activate() work as expected.
    
  20. File: ./../src/zodbcode/class_.py:384
                        # XXX Make sure the object is in the cache before
                        # calling setstate().
                        dm._cache[cls._p_oid] = cls
                        dm.setstate(cls)
    
  21. File: ./../src/zodbcode/class_.py:389
                        # XXX Should really put in special inconsistent state
                        cls._p_state = UPTODATE
                else:
                    print id(cls), "dm", dm, "oid", cls._p_oid
    
  22. File: ./../src/zodbcode/class_.py:398
            # XXX This should really be _p_getnewargs() or something like that.
    
            # If the class is later loaded and unghostified, the arguments
            # passed to __new__() won't have an __module__.  It seems that
    
  23. File: ./../src/zodbcode/class_.py:410
            # XXX This doesn't handle __methods__ correctly.
    
            # ExtClassDataDescrs.  As a hack, I'm deleting _p_oid
            # and _p_jar from the keys dict, because I know they
            # will be descrs and they won't change as a result of
    
  24. File: ./../src/zodbcode/function.py:142
            # XXX What if the function module is deactivated while the
            # function is executing?  It seems like we need to expose
            # refcounts at the Python level to guarantee that this will
            # work.
    
  25. File: ./../src/zodbcode/function.py:156
                # XXX Is this sufficient?
                if self._v_side_effect:
                    self._pf_module._p_changed = True
    
    
  26. File: ./../src/zodbcode/function.py:163
            # XXX new.function doesn't accept a closure
            func = self._pf_func
            func_state = func.func_defaults, func.func_dict or None
    
    
  27. File: ./../src/zodbcode/module.py:47
    # XXX Is this comment still relevant?
    #
    # There seems to be something seriously wrong with a module pickle
    # that contains objects pickled via save_global().  These objects are
    
  28. File: ./../src/zodbcode/module.py:70
        # XXX need getattr &c. hooks to update _p_changed?
    
        def __getstate__(self):
            d = self.__dict__.copy()
    
  29. File: ./../src/zodbcode/module.py:87
        # XXX Is it okay that these packages don't have __path__?
    
        # A PersistentPackage can exist in a registry without a manager.
        # It only gets a manager if someone creates an __init__ module for
    
  30. File: ./../src/zodbcode/module.py:113
        # XXX need to be able to replace sys.std{in,out,err} at this point
        exec source in moddict
        del moddict[__persistent_module_registry__]
        new_names = NameFinder(module)
        replacements = new_names.replacements(old_names)
    
  31. File: ./../src/zodbcode/module.py:304
                # XXX should raise a better error
                raise ValueError(name)
            self._p_changed = True
            self._modules[name] = module
    
  32. File: ./../src/zope/i18n/format.py:152
                        # TODO: Find timezones using locale information
                        pass
    
            # Create a date/time object from the data
    
  33. File: ./../src/zope/i18n/format.py:442
            # TODO: Need to make sure unicode is everywhere
            return unicode(text)
    
    
    
  34. File: ./../src/zope/i18n/format.py:554
        # TODO: works for gregorian only right now
        for entry in _findFormattingCharacterInPattern('G', pattern):
            info[entry] = r'(%s|%s)' %(calendar.eras[1][1], calendar.eras[2][1])
    
    
  35. File: ./../src/zope/i18n/format.py:649
        # TODO: works for gregorian only right now
        for entry in _findFormattingCharacterInPattern('G', pattern):
            info[entry] = calendar.eras[2][1]
    
    
  36. File: ./../src/zope/i18n/locales/__init__.py:351
            # TODO: Implement this method
            return False
    
        def getFirstWeekDayName(self):
    
  37. File: ./../src/zope/i18n/locales/__init__.py:632
            # TODO: What about keys??? Where do I get this info from?
            pieces = [key+'='+type for key, type in ()]
            if pieces:
                id_string += '@' + ','.join(pieces)
    
  38. File: ./../src/zope/i18n/tests/test_formats.py:274
            # TODO: The parser does not support timezones yet.
            self.assertEqual(self.format.parse(
                '2. Januar 2003 21:48:01 +100',
                'd. MMMM yyyy HH:mm:ss z'),
    
  39. File: ./../src/zope/i18n/tests/test_formats.py:282
            # TODO: The parser does not support timezones yet.
            self.assertEqual(self.format.parse(
                'Donnerstag, 2. Januar 2003 21:48 Uhr +100',
                "EEEE, d. MMMM yyyy H:mm' Uhr 'z"),
    
  40. File: ./../src/zope/i18n/interfaces/__init__.py:263
            # TODO: I'd like for there to be a symmetric interface method, one in
            # which an adapter is gotten for both the first arg and the second
            # arg.  I.e. getLanguage(obj, env)
            # But this isn't a good match for the ITranslationService.translate()
    
  41. File: ./../src/zope/app/interpreter/tests/test_pythoninterpreter.py:65
    # TODO: get global statements working
    # The compiler module, which we now rely on, doesn't handle global
    # statements correctly.
    ##     def test_global_variable_assignment(self):
    
  42. File: ./../src/zope/app/interpreter/python.py:40
                # TODO: There are no tests for this branch
                code.exec_(globals,
                           {}, # we don't want to get local assignments saved.
                           )
    
  43. File: ./../src/zope/app/undo/__init__.py:121
                # TODO: The 'user' in the transactions is a concatenation
                # of 'path' and 'user' (id).  'path' used to be the path
                # of the user folder in Zope 2.  ZopePublication currently
                # does not set a path, so ZODB lets the path default to
    
  44. File: ./../src/zope/app/undo/__init__.py:140
                    # TODO: This is because of ZODB3/Zope2 cruft regarding
                    # the user path (see comment above).  This 'if' block
                    # should go away.
                    split = user_name.split()
    
  45. File: ./../src/zope/app/renderer/metaconfigure.py:62
    # TODO: Does not seem to be tested
    def renderer(_context, sourceType, for_, factory):
        def dottify(obj):
            try:
    
  46. File: ./../src/zope/app/file/image.py:76
            #TODO the way this message id is defined, it won't be picked up by
            # i18nextract and never show up in message catalogs
            return _(byte_size + ' ${width}x${height}', mapping=mapping)
    
    
  47. File: ./../src/zope/app/session/DEPENDENCIES.cfg:9
    # TODO This dependency is bad.  It reflects use of a utility function
    # that should be copied elsewhere:
    zope.server
    
  48. File: ./../src/zope/app/session/http.py:252
            # TODO: Currently, the path is the ApplicationURL. This is reasonable,
            #     and will be adequate for most purposes.
            #     A better path to use would be that of the folder that contains
            #     the site manager this service is registered within. However,
    
  49. File: ./../src/zope/app/session/session.py:193
            # TODO: When scheduler exists, sweeping should be done by
            # a scheduled job since we are currently busy handling a
            # request and may end up doing simultaneous sweeps
    
    
  50. File: ./../src/zope/app/sqlscript/dtml.py:96
                # TODO: Ahh, the code from DT_SQLVar is duplicated here!!!
                if t == 'int':
                    try:
                        if isinstance(v, StringTypes):
    
  51. File: ./../src/zope/app/sqlscript/dtml.py:234
            # TODO: Shrug, should these tyoes be really hard coded? What about
            # Dates and other types a DB supports; I think we should make this
            # a plugin.
            if t == 'int':
    
  52. File: ./../src/zope/app/security/basicauthadapter.py:31
            # TODO base64 decoding should be done here, not in request
            lpw = request._authUserPW()
            if lpw is None:
                login, password = None, None
    
  53. File: ./../src/zope/app/pagetemplate/engine.py:120
            # TODO This is only needed when self.evaluateInlineCode is true,
            # so should only be needed for zope.app.pythonpage.
            from zope.app.interpreter.interfaces import IInterpreter
            interpreter = component.queryUtility(IInterpreter, lang)
    
  54. File: ./../src/zope/app/workflow/browser/instance.py:65
        # TODO:
        # This is temporary till we find a better name to use
        # objects that are stored in annotations
        # Steve suggested a ++annotations++ Namespace for that.
    
  55. File: ./../src/zope/app/workflow/interfaces/wfmc.py:26
    # TODO:
    # - Specify all attributes as schema fields where possible
    # - Define necessary methods for interfaces
    
    
  56. File: ./../src/zope/app/workflow/stateful/definition.py:193
            # TODO:
            # Process instances need to have a place, so they can look things
            # up.  It's not clear to me (Jim) what place they should have.
    
    
  57. File: ./../src/zope/app/workflow/stateful/tests/test_definition.py:47
    # TODO: Tests missing for:
    # State Class/Interface
    # Transition Class/Interface
    
    
  58. File: ./../src/zope/app/workflow/stateful/browser/definition.py:46
    # TODO: Temporary ...
    class StateAddFormHelper(object):
        # Hack to prevent from displaying an empty addform
        def __call__(self, template_usage=u'', *args, **kw):
    
  59. File: ./../src/zope/app/workflow/stateful/browser/definition.py:167
        # TODO: This could and should be handled by a Vocabulary Field/Widget
        def getStateNames(self):
            pd = self.context.getProcessDefinition()
            states = removeAllProxies(pd.getStateNames())
    
  60. File: ./../src/zope/app/workflow/stateful/browser/content_filter.py:57
        # TODO: This method assumes you have a publishing workflow
        def listPublishedItems(self):
            return self.filterByState(self.listContentInfo(), 'published')
    
    
  61. File: ./../src/zope/app/workflow/stateful/xmlimportexport.py:143
            # TODO: Implementation needs more work !!
            # check if xml-data can be imported and represents a StatefulPD
            checker = XMLFormatChecker()
            parseString(data, checker)
    
  62. File: ./../src/zope/app/workflow/stateful/interfaces.py:88
        # TODO: Should at least have a title, if not a value as well
    
    class IStatefulStatesContainer(IProcessDefinitionElementContainer):
        """Container that stores States."""
    
  63. File: ./../src/zope/app/workflow/stateful/instance.py:233
            # TODO This needs to be discussed:
            # how can we know if this ProcessInstance is annotated
            # to a Content-Object and provide secure ***READONLY***
            # Access to it for evaluating Transition Conditions ???
    
  64. File: ./../src/zope/app/workflow/stateful/instance.py:240
            # TODO: How can i make sure that nobody modifies content
            # while the condition scripts/conditions are evaluated ????
            # this hack only prevents from directly setting an attribute
            # using a setter-method directly is not protected :((
    
  65. File: ./../src/zope/app/http/put.py:69
            # TODO: Argh. Why don't we have a unioned Interface for that?!?
            dir_write = IWriteDirectory(container)
            dir_read = IReadDirectory(container)
    
    
  66. File: ./../src/zope/app/http/put.py:80
            # TODO: Need to add support for large files
            data = body.read()
    
            newfile = factory(name, request.getHeader('content-type', ''), data)
    
  67. File: ./../src/zope/app/http/options.py:35
            # TODO: This could be cleaned up by providing special target
            # interfaces for HTTP methods. This way we can even list verbs that
            # are not in the lists above.
            for m in _allowed_methods:
    
  68. File: ./../src/zope/app/http/options.py:44
            # TODO: Most of the time, this is a lie. We not fully support
            # DAV 2 on all objects, so probably an interface check is needed.
            self.request.response.setHeader('DAV', '1,2', literal=True)
            # UGLY! Some clients rely on this. eg: MacOS X
    
  69. File: ./../src/zope/app/externaleditor/browser/__init__.py:63
            # TODO: Once we have lock, add the lock token here
    
            r.append('')
    
    
  70. File: ./../src/zope/app/onlinehelp/browser/tree.py:136
                # TODO: fix it, functional test doesn't like zapi.getPath? ri
                pass
            return False
    
  71. File: ./../src/zope/app/onlinehelp/onlinehelptopic.py:490
        # TODO: we need some unittests for this !!!
        def __getitem__(self, name):
            return self.index.macros[name]
    
    
  72. File: ./../src/zope/app/sqlexpr/sqlexpr.py:36
                # TODO: It is hard-coded that the connection name variable is called
                # 'sql_conn'. We should find a better solution.
                conn_name = econtext.vars['sql_conn']
                adapter = queryUtility(IZopeDatabaseAdapter, conn_name)
    
  73. File: ./../src/zope/app/apidoc/.svn/tmp/presentation.py.tmp:83
        # TODO: See issue http://www.zope.org/Collectors/Zope3-dev/504, ri
        elif factory.__module__ is not None and \
                 factory.__module__.startswith(JSONRPC_DIRECTIVES_MODULE):
    
    
  74. File: ./../src/zope/app/apidoc/.svn/tmp/component.py.tmp:235
        # TODO: Once we support passive display of instances, this insanity can go
        #       away.
        if not isinstance(component, (types.MethodType, types.FunctionType,
                                      types.ClassType, types.TypeType,
    
  75. File: ./../src/zope/app/apidoc/.svn/tmp/classregistry.py.tmp:23
    # TODO: List hard-coded for now.
    IGNORE_MODULES = ['twisted']
    
    import sys
    import zope.app.zcmlfiles
    
    # Ignore these files, since they are not necessary or cannot be imported
    
  76. File: ./../src/zope/app/apidoc/classregistry.py:23
    # TODO: List hard-coded for now.
    IGNORE_MODULES = ['twisted']
    
    import sys
    
  77. File: ./../src/zope/app/apidoc/component.py:235
        # TODO: Once we support passive display of instances, this insanity can go
        #       away.
        if not isinstance(component, (types.MethodType, types.FunctionType,
                                      types.ClassType, types.TypeType,
    
  78. File: ./../src/zope/app/apidoc/presentation.py:83
        # TODO: See issue http://www.zope.org/Collectors/Zope3-dev/504, ri
        elif factory.__module__ is not None and \
                 factory.__module__.startswith(JSONRPC_DIRECTIVES_MODULE):
    
    
  79. File: ./../src/zope/app/tree/browser/tests.py:45
        # TODO: test stateful tree view
    
    class CookieTreeViewTest(StatefulTreeViewTest):
    
    
  80. File: ./../src/zope/app/appsetup/tests.py:47
    # TODO: some methods from the boostap modue are not tested
    #
    
    class TestBootstrapSubscriber(PlacefulSetup, unittest.TestCase):
    
  81. File: ./../src/zope/app/appsetup/tests.py:120
            # TODO: check EventSub
            root_folder = self.root_folder
            for i in range(2):
                cx = self.db.open()
    
  82. File: ./../src/zope/app/server/.svn/tmp/zpasswd.py.tmp:26
    # TODO: We need to resolve code duplication in zpasswd.py and mkzopeinstance.py
    
    def main(argv=None):
        """Top-level script function to create a new principals."""
    
  83. File: ./../src/zope/app/server/mkzopeinstance.py:207
            # TODO we should be able to compute the script
            script = os.path.abspath(sys.argv[0])
            zope_home = os.path.dirname(os.path.dirname(script))
            zope_init = os.path.dirname(os.path.abspath(zope.app.__file__))
    
  84. File: ./../src/zope/app/server/DEPENDENCIES.cfg:1
    # TODO: Figure out what these should be.
    ThreadedAsync
    ZConfig
    zdaemon
    
  85. File: ./../src/zope/app/server/servercontrol.py:28
            # TODO: Graceful shutdown does not work yet.
    
            # This will work for servers started directly and by zdaemon. Passing
            # an exit status of 0 causes zdaemon to not restart the process.
    
  86. File: ./../src/zope/app/server/servercontrol.py:36
            # TODO: Graceful restart does not work yet.
    
    
            # Passing an exit status of 1 causes zdaemon to restart the process.
            LoopCallback.exit_status = 1
    
  87. File: ./../src/zope/app/server/zpasswd.py:26
    # TODO: We need to resolve code duplication in zpasswd.py and mkzopeinstance.py
    
    def main(argv=None):
        """Top-level script function to create a new principals."""
    
  88. File: ./../src/zope/app/generations/browser/.svn/tmp/managerdetails.py.tmp:79
                    # XXX: the renderer *expects* unicode as input encoding (ajung)
                    renderer = ReStructuredTextToHTMLRenderer(
                        unicode(info), self.request)
                    info = renderer.render()
    
  89. File: ./../src/zope/app/generations/browser/managers.py:36
            # TODO: There needs to be a better api for this
            return self.request.publication.db
    
        def evolve(self):
    
  90. File: ./../src/zope/app/generations/browser/managerdetails.py:79
                    # XXX: the renderer *expects* unicode as input encoding (ajung)
                    renderer = ReStructuredTextToHTMLRenderer(
                        unicode(info), self.request)
                    info = renderer.render()
    
  91. File: ./../src/zope/app/container/browser/adding.py:133
            # TODO: If the factory wrapped by LocationProxy is already a Proxy,
            #       then ProxyFactory does not do the right thing and the
            #       original's checker info gets lost. No factory that was
            #       registered via ZCML and was used via addMenuItem worked
    
  92. File: ./../src/zope/app/container/browser/contents.py:403
                # TODO Can't we add a 'copy_of' or something as a prefix
                # instead of raising an exception ?
                raise UserError(
                    _("The given name(s) %s is / are already being used" %(
    
  93. File: ./../src/zope/app/container/btree.py:33
        # TODO: It appears that BTreeContainer uses SampleContainer only to
        # get the implementation of __setitem__().  All the other methods
        # provided by that base class are just slower replacements for
        # operations on the BTree itself.  It would probably be clearer to
    
  94. File: ./../src/zope/app/publisher/browser/__init__.py:67
    # TODO: needs tests
    def getDefaultViewName(object, request, context=None):
        name = queryDefaultViewName(object, request, context=context)
        if name is not None:
    
  95. File: ./../src/zope/app/publisher/browser/viewmeta.py:116
        # TODO: new __name__ attribute must be tested
        if class_:
            if attribute != '__call__':
                if not hasattr(class_, attribute):
    
  96. File: ./../src/zope/app/publisher/fieldconverters.py:40
        # TODO:  look up a real tzinfo object using 'tzname'
        #
        # Option 1:  Use 'timezones' module as global registry::
        #
    
  97. File: ./../src/zope/app/interface/tests/test_interface.py:34
    # TODO: for some reason changing this code to use implements() does not
    # work. This is due to a bug that is supposed to be fixed after X3.0.
    code = """\
    from zope.interface import Interface
    
  98. File: ./../src/zope/app/component/tests/.svn/tmp/test_registration.py.tmp:76
    # XXX fix ZODB
    class FileStorage(ZODB.FileStorage.FileStorage):
        
        def new_oid(self):
    
  99. File: ./../src/zope/app/component/tests/test_directives.py:50
    # TODO: tests for other directives needed
    
    atre = re.compile(' at [0-9a-fA-Fx]+')
    
    
  100. File: ./../src/zope/app/component/tests/test_registration.py:76
    # XXX fix ZODB
    class FileStorage(ZODB.FileStorage.FileStorage):
        
        def new_oid(self):
    
  101. File: ./../src/zope/app/component/interfaces/__init__.py:106
        # XXX we need to figure out how to constrain this or, alternatively,
        # just use regular folders, which is probably the beter choice.
        # zope.app.container.constraints.containers(ILocalSiteManager)
    
    
  102. File: ./../src/zope/app/component/back35.py:317
        # TODO: for now until we figure out a way to specify the factory directly
        factoryName = schema.TextLine(
            title=_(u"Factory Name"),
            readonly=False,
    
  103. File: ./../src/zope/app/form/browser/sequencewidget.py:178
        # TODO: applyChanges isn't reporting "change" correctly (we're
        # re-generating the sequence with every edit, and need to be smarter)
        def applyChanges(self, content):
            field = self.context
    
  104. File: ./../src/zope/app/form/browser/objectwidget.py:157
                # TODO: ObjectCreatedEvent here would be nice
                value = self.factory()
    
            # apply sub changes, see if there *are* any changes
            changes = applyWidgetsChanges(self, field.schema, target=value,
                                          names=self.names)
    
    
  105. File: ./../src/zope/app/form/browser/objectwidget.py:168
            # TODO: If value implements ILocation, set name to field name and
            # parent to content
    
            return changes
    
  106. File: ./../src/zope/app/form/browser/textwidgets.py:135
                kwargs['maxlength'] = self.displayMaxWidth # TODO This is untested.
    
            return renderElement(self.tag, **kwargs)
    
    
  107. File: ./../src/zope/app/form/browser/textwidgets.py:528
                    # TODO: Currently datetimes return in local (server)
                    # time zone if no time zone information was given.
                    # Maybe offset-naive datetimes should be returned in
                    # this case? (DV)
    
  108. File: ./../src/zope/app/form/browser/itemswidgets.py:164
            #XXX: _getFormValue() should return a string value that can be
            #     used in a HTML form, but it doesn't. When
            #     http://www.zope.org/Collectors/Zope3-dev/584 gets fixed
            #     this hack should be reverted.
    
  109. File: ./../src/zope/app/form/browser/source.py:191
                # TODO This code path is untested.
                return zapi.getMultiAdapter((self._error, self.request),
                                            IWidgetInputErrorView).snippet()
            return ""
    
  110. File: ./../src/zope/app/form/browser/source.py:303
                    # TODO This code path is untested.
                    raise zope.app.form.interfaces.MissingInputError(
                        field.__name__, self.label,
                        )
    
  111. File: ./../src/zope/app/form/browser/source.py:312
                # TODO This code path is untested.
                err = zope.schema.interfaces.ValidationError(
                    "Invalid value id", token)
                raise WidgetInputError(field.__name__, self.label, err)
    
  112. File: ./../src/zope/app/form/browser/source.py:323
                # TODO This code path is untested.
                self._error = WidgetInputError(field.__name__, self.label, err)
                raise self._error
    
    
  113. File: ./../src/zope/app/form/browser/source.py:496
                # TODO This code path is untested.
                self._error = WidgetInputError(field.__name__, self.label, err)
                raise self._error
    
    
  114. File: ./../src/zope/app/form/interfaces.py:48
            # TODO this duck typing is to get the code working.  See
            # collector issue 372
            if isinstance(self.errors, basestring):
                return self.errors
    
  115. File: ./../src/zope/app/fssync/tests/test_committer.py:533
        # TODO Extra and Annotations is not tested directly
    
    
    
    
    
  116. File: ./../src/zope/app/fssync/browser/__init__.py:149
            # TODO need to make sure the top-level name doesn't already
            # exist, or existing site data can get screwed
            self.call_committer()
            return ""
    
  117. File: ./../src/zope/app/publication/tests/.svn/tmp/test_httpfactory.py.tmp:70
            # TODO: making a SOAP request without configuring a SOAP request
            # currently generates an XMLRPC request.  Not sure what the right thing
            # is, but that doesn't seem to be the right thing.
            soaprequestfactory = DummyRequestFactory()
    
  118. File: ./../src/zope/app/publication/tests/test_httpfactory.py:70
            # TODO: making a SOAP request without configuring a SOAP request
            # currently generates an XMLRPC request.  Not sure what the right thing
            # is, but that doesn't seem to be the right thing.
            soaprequestfactory = DummyRequestFactory()
    
  119. File: ./../src/zope/app/publication/interfaces.py:69
        # TODO: should SOAP, XMLRPC, and Browser extend this?
        """generic HTTP request factory"""
    
    class IXMLRPCRequestFactory(IRequestFactory):
    
  120. File: ./../src/zope/app/principalannotation/__init__.py:20
    # TODO: register utility as adapter for IAnnotations on utility activation.
    
    from persistent import Persistent
    from persistent.dict import PersistentDict
    
  121. File: ./../src/zope/app/principalannotation/__init__.py:138
        """ # TODO move this out to a doctest file when we have one...
        utility = component.getUtility(IPrincipalAnnotationUtility)
        return utility.getAnnotations(principal)
    component.adapter(zope.security.interfaces.IPrincipal)(annotations)
    
  122. File: ./../src/zope/app/locales/extract.py:376
            # TODO this assumes a checkout directory structure
            site_zcml = os.path.join(dirname(dirname(dirname(zope.__file__))),
                                     "site.zcml")
        context = config(site_zcml, features=("devmode",), execute=False)
    
  123. File: ./../src/zope/app/versioncontrol/repository.py:81
            # TODO There ought to be some way to do this more cleanly.
            # This fills the __dict__ of the old object with new state.
            # The other way to achieve the desired effect is to replace
            # the object in its container, but this method preserves the
    
  124. File: ./../src/zope/app/versioncontrol/utility.py:85
            # TODO obviously no test for this
            if (zope.location.ILocation.providedBy(ob)
                and not zope.location.inside(ob, object)):
                return '1' # go away
    
  125. File: ./../src/zope/app/versioncontrol/interfaces.py:183
        # TODO: This *should* be a datetime, but we don't yet know how it's used.
        timestamp = zope.schema.Float(
            description=_("time value indicating the"
                          " when the bookkeeping information was created"),
    
  126. File: ./../src/zope/app/versioncontrol/interfaces.py:189
        # TODO: This *should* be an ASCIILine, but there isn't one (yet).
        history_id = zope.schema.ASCII(
            description=_("""
            Id of the version history related to the version controlled resource.
    
  127. File: ./../src/zope/app/versioncontrol/interfaces.py:198
        # TODO: This *should* be an ASCIILine, but there isn't one (yet).
        version_id = zope.schema.ASCII(
            description=_(
            "version id that the version controlled resource is based upon"))
    
  128. File: ./../src/zope/app/versioncontrol/interfaces.py:295
    # TODO: figure out if we can get rid of this
    IVersionedContainer = INonVersionedData
    
    
    
  129. File: ./../src/zope/app/versioncontrol/interfaces.py:372
        # TODO: should be ASCIILine
        label = zope.schema.ASCII(
            title=_("Label"),
            description=_("Label applied to the version."),
    
  130. File: ./../src/zope/app/versioncontrol/interfaces.py:382
        # TODO: should be ASCIILine
        branch_id = zope.schema.ASCII(
            title=_("Branch Id"),
            description=_("Identifier for the new branch."),
    
  131. File: ./../src/zope/app/intid/browser/__init__.py:28
            # TODO: I think this should be moved to the functional test.
            self.context.register(zapi.traverse(self.context, "/"))
            self.context.register(zapi.traverse(self.context, "/++etc++site"))
            self.request.response.redirect('index.html')
    
  132. File: ./../src/zope/app/error/.svn/tmp/error.py.tmp:177
                    # TODO: Temporary fix, which Steve should undo. URL is
                    #      just too HTTPRequest-specific.
                    if hasattr(request, 'URL'):
                        url = request.URL
    
  133. File: ./../src/zope/app/error/error.py:177
                    # TODO: Temporary fix, which Steve should undo. URL is
                    #      just too HTTPRequest-specific.
                    if hasattr(request, 'URL'):
                        url = request.URL
    
  134. File: ./../src/zope/app/authentication/principalfolder.py:59
            # TODO: The password manager name may be changed only
            # if the password changed
            readonly=True
            )
        _cookies = None
        
        def __init__(self, cookies=None):
    
  135. File: ./../src/zope/app/testing/tests.py:186
        # TODO: expand the IHTTPResponse interface to give access to all cookies
        _cookies = None
        
        def __init__(self, cookies=None):
    
  136. File: ./../src/zope/app/testing/functional.py:298
            # TODO: extend the IHTTPRequest interface to allow access to all 
            # cookies
            for k,v in response._cookies.items():
                k = k.encode('utf8')
                self.cookies[k] = v['value'].encode('utf8')
    
  137. File: ./../src/zope/app/recorder/browser.py:83
                        #TODO variable insertions must not be expanded
                        # until after the translation... preferably use
                        # mapping here
                        self.error = _('Invalid regex: %s') % pattern
    
  138. File: ./../src/zope/app/preference/preference.py:178
            # TODO: what if we have multiple participations?
            principal = getInteraction().participations[0].principal
            ann = utility.getAnnotations(principal)
    
    
  139. File: ./../src/zope/app/winservice/service.py:71
            # TODO:  This TerminateProcess call doesn't make much sense:  it's
            # doing a hard kill _first_, never giving the process a chance to
            # shut down cleanly.  Compare to current Zope2 service code, which
            # uses Windows events to give the process a chance to shut down
    
  140. File: ./../src/zope/app/twisted/tests/test_zeo.py:96
        >>> browser.mech_browser.close() # TODO: Browser needs close.
        >>> inst1.stop()
        >>> inst2.stop()
        >>> ZEO.tests.forker.shutdown_zeo_server(('localhost', zeo_port))
    
  141. File: ./../src/zope/app/twisted/servercontrol.py:37
            # TODO: Make sure this is only called if we are running via zdaemon.
            # Setting the module global variable in the main module signals zdaemon to restart
            main.should_restart = True
            reactor.callLater(time, reactor.stop)
    
  142. File: ./../src/zope/app/xmlrpcintrospection/.svn/tmp/xmlrpcintrospection.py.tmp:61
            # TODO might be outsourced to some utility
            for registration in registrations:
                for required_iface in registration.required:
                    if (required_iface is IXMLRPCRequest and
    
  143. File: ./../src/zope/app/xmlrpcintrospection/.svn/tmp/xmlrpcintrospection.py.tmp:70
            # TODO might be outsourced to some utility
            results = []
            for interface in interfaces:
                registrations = list(getViews(interface, IXMLRPCRequest))
    
  144. File: ./../src/zope/app/xmlrpcintrospection/.svn/tmp/xmlrpcintrospection.py.tmp:107
            # TODO if defaults are given, render their type
            return [['undef'] * (self._getFunctionArgumentSize(func) + 1)]
    
        def _getFunctionHelp(self, func):
    
  145. File: ./../src/zope/app/xmlrpcintrospection/xmlrpcintrospection.py:61
            # TODO might be outsourced to some utility
            for registration in registrations:
                for required_iface in registration.required:
                    if (required_iface is IXMLRPCRequest and
    
  146. File: ./../src/zope/app/xmlrpcintrospection/xmlrpcintrospection.py:70
            # TODO might be outsourced to some utility
            results = []
            for interface in interfaces:
                registrations = list(getViews(interface, IXMLRPCRequest))
    
  147. File: ./../src/zope/app/xmlrpcintrospection/xmlrpcintrospection.py:107
            # TODO if defaults are given, render their type
            return [['undef'] * (self._getFunctionArgumentSize(func) + 1)]
    
        def _getFunctionHelp(self, func):
    
  148. File: ./../src/zope/tal/talinterpreter.py:43
        # TODO: The problem with this is that this is not valid XML and
        # can't be parsed back!
        "compact", "nowrap", "ismap", "declare", "noshade", "checked",
        "disabled", "readonly", "multiple", "selected", "noresize",
    
  149. File: ./../src/zope/tal/talinterpreter.py:635
            # TODO: Code duplication is BAD, we need to fix it later
            text = self.engine.evaluateText(stuff[0])
            if text is not None:
                if text is self.Default:
    
  150. File: ./../src/zope/tal/talinterpreter.py:665
                # TODO: Seems like this branch not used anymore, we
                # need to remove it
    
                # Evaluate the value to be associated with the variable in the
    
  151. File: ./../src/zope/tal/talinterpreter.py:730
            # TODO: I can't decide whether we want to cgi escape the translated
            # string or not.  OTOH not doing this could introduce a cross-site
            # scripting vector by allowing translators to sneak JavaScript into
            # translations.  OTOH, for implicit interpolation values, we don't
    
  152. File: ./../src/zope/tal/talinterpreter.py:765
            # TODO: Code duplication is BAD, we need to fix it later
            structure = self.engine.evaluateStructure(expr)
            if structure is not None:
                if structure is self.Default:
    
  153. File: ./../src/zope/tal/talinterpreter.py:839
            # TODO: We need to pass in one of context or target_language
            return self.engine.translate(msgid, self.i18nContext.domain,
                                         i18ndict, default=default)
    
    
  154. File: ./../src/zope/tal/talinterpreter.py:969
            # TODO: this should not catch ZODB.POSException.ConflictError.
            # The ITALExpressionEngine interface should provide a way of
            # getting the set of exception types that should not be
            # handled.
    
  155. File: ./../src/zope/tal/setpath.py:23
    # TODO: Why does this want to find ZODB ???
    
    import os
    import sys
    
  156. File: ./../src/zope/tal/tests/markbench.py:160
                # TODO: Failing tests don't cause test.py to report an
                # error; not sure why.  ;-(
                sys.exit(rc)
            elif rc < 0:
    
  157. File: ./../src/zope/tal/tests/test_talinterpreter.py:844
        # TODO: Deactivated test, since we have not found a solution for this and
        # it is a deep and undocumented HTML parser issue.
        # Fred is looking into this.
        #suite.addTest(unittest.makeSuite(MacroFunkyErrorTest))
    
  158. File: ./../src/zope/tal/tests/run.py:28
    # TODO this code isn't picked up by the Zope 3 test framework..
    def test_suite():
        suite = unittest.TestSuite()
        suite.addTest(test_htmltalparser.test_suite())
    
  159. File: ./../src/zope/tal/dummyengine.py:147
            # TODO Should return None or a DOM tree
            return self.evaluate(expr)
    
        # implementation; can be overridden
    
  160. File: ./../src/zope/tal/dummyengine.py:152
            # TODO: Should return a sequence
            return self.evaluate(expr)
    
        def evaluateMacro(self, macroName):
    
  161. File: ./../src/zope/tal/talgettext.py:86
            # TODO: We need to pass in one of context or target_language
            return self.engine.translate(msgid, self.i18nContext.domain, i18ndict,
                                         default=default, position=self.position)
    
    
  162. File: ./../src/zope/tal/talgettext.py:201
                # TODO: Does this always follow Python escape semantics?
                l = eval(l)
                if section == ID:
                    msgid += l
    
  163. File: ./../src/zope/tal/talgettext.py:303
        # TODO: You should not sort by msgid, but by filename and position. (SR)
        msgids.sort()
        for msgid in msgids:
            positions = engine.catalog[msgid]
    
  164. File: ./../src/zope/tal/talgenerator.py:316
            # TODO: Code duplication is BAD, we need to fix it later
            key, expr = parseSubstitution(arg)
            cexpr = self.compileExpression(expr)
            program = self.popProgram()
    
  165. File: ./../src/zope/tal/talgenerator.py:475
            # TODO: Ugly hack to work around tal:replace and i18n:translate issue.
            # I (DV) need to cleanup the code later.
            replaced = False
            if "replace" in taldict:
    
  166. File: ./../src/zope/tal/talgenerator.py:568
                # TODO: at some point we should insist on a non-trivial position
                self.emit("setPosition", position)
            if self.inMacroUse:
                if fillSlot:
    
  167. File: ./../src/zope/proxy/tests/test_proxy.py:263
            # TODO: should test all inplace operators...
            P = self.new_proxy
    
            pa = P(1)
    
  168. File: ./../src/zope/xmlpickle/ppml.py:17
    # TODO: This doesn't work properly for protocol 2 pickles yet; that
    # still needs to be dealt with.  Particular issues that need to be
    # addressed involve supporting the changes for new-style objects.
    
    
  169. File: ./../src/zope/xmlpickle/ppml.py:218
    # TODO: use of a regular expression here seems to be brittle
    # due to fuzzy semantics of unicode "surrogates".
    # Eventually, we should probably rewrite this as a C
    # function.
    
  170. File: ./../src/zope/xmlpickle/ppml.py:279
        # TODO: This doesn't do what I want anymore because we can't strip v
        def _output_nonscalar(self, write, name, id, v, str_indent, indent):
            write('%s<%s%s> ' % (str_indent, name, id))
            v.output(write, indent+2)
    
  171. File: ./../src/zope/publisher/tests/test_browserresponse.py:23
    # TODO: Waaa need more tests
    
    class TestBrowserResponse(TestCase):
    
    
  172. File: ./../src/zope/publisher/interfaces/http.py:217
        # TODO: Eventially this will be a different method
        def _authUserPW():
            """Return (login, password) if there are basic credentials;
            return None if there aren't."""
    
  173. File: ./../src/zope/publisher/http.py:208
            # XXX We should pass the ``size`` argument to self.stream.readline
            # but twisted.web2.wsgi.InputStream.readline() doesn't accept it.
            # See http://www.zope.org/Collectors/Zope3-dev/535 and
            #     http://twistedmatrix.com/trac/ticket/1451
    
  174. File: ./../src/zope/publisher/browser.py:718
            # TODO: HTTP redirects must provide an absolute location, see
            #       http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
            #       So, what if location is relative and base is unknown?  Uncomment
            #       the following and you'll see that it actually happens.
    
  175. File: ./../src/zope/publisher/xmlrpc.py:49
            # XXX using readlines() instead of lines()
            # as twisted's BufferedStream sends back
            # an empty stream here for read() (bug)
            lines = ''.join(self._body_instream.readlines())
    
  176. File: ./../src/zope/publisher/contenttype.py:25
    # TODO: This still needs to support comments in structured fields as
    # specified in RFC 2822.
    
    
    
  177. File: ./../src/zope/schema/tests/test_setfield.py:144
            # TODO: We should not allow for a None value type. 
            Set(value_type=None)
    
            # do not allow arbitrary value types
    
  178. File: ./../src/zope/schema/tests/test_setfield.py:259
            # TODO: We should not allow for a None value type. 
            FrozenSet(value_type=None)
    
            # do not allow arbitrary value types
    
  179. File: ./../src/zope/schema/tests/test_vocabulary.py:59
        # TODO: still need to test the default implementation
    
    class SampleTerm(object):
        pass
    
  180. File: ./../src/zope/schema/tests/test_listfield.py:94
            # TODO: We should not allow for a None valeu type. 
            List(value_type=None)
    
            # do not allow arbitrary value types
    
  181. File: ./../src/zope/schema/_field.py:137
            # TODO: we should probably use a more general definition of newlines
            return '\n' not in value
    
    class ASCIILine(ASCII):
    
  182. File: ./../src/zope/schema/_field.py:146
            # TODO: we should probably use a more general definition of newlines
            return '\n' not in value
    
    class Float(Orderable, Field):
    
  183. File: ./../src/zope/schema/interfaces.py:470
        # TODO: There should be a more specialized field type for this.
        token = Attribute(
            "token",
            """Token which can be used to represent the value on a stream.
    
  184. File: ./../src/zope/component/tests.py:977
                    raise # TODO verify sanity of a pass on EINTR :-/
            lines = process.stdout.readlines()
            process.stdout.close()
            for l in reversed(lines):
    
  185. File: ./../src/zope/fssync/fsmerger.py:55
                # TODO: We should be able to deal with this case, too
                self.reporter("TODO: %s" % local)
                # thing to do anyway
                return
            flag = self.metadata.getentry(local).get("flag")
    
  186. File: ./../src/zope/fssync/fsmerger.py:305
            # TODO: This should have a larger set of default patterns to
            # ignore, and honor .cvsignore
            fn = basename(path)
            return (fn.endswith("~")
    
  187. File: ./../src/zope/fssync/tests/test_snarf.py:142
        # TODO: More to add...
    
    def test_suite():
        s = unittest.TestSuite()
    
  188. File: ./../src/zope/fssync/tests/test_network.py:123
            # TODO: This test will fail if a file /tmp/@@Zope/Root exists :-(
            target = self.tempdir()
            self.assertEqual(self.network.findrooturl(target), None)
    
    
  189. File: ./../src/zope/fssync/tests/test_merger.py:204
        # TODO: need test cases for anomalies, e.g. files missing or present
        # in spite of metadata, or directories instead of files, etc.
    
    def test_suite():
    
  190. File: ./../src/zope/fssync/server/entryadapter.py:23
    # TODO: This is a bug; we shouldn't depend on these packages at all.
    # Need to restructure.
    from zope.proxy import removeAllProxies
    #from zope.app.fssync import fspickle
    
  191. File: ./../src/zope/fssync/server/entryadapter.py:91
            # TODO: for now, remove all proxies.
            ObjectEntryAdapter.__init__(self, removeAllProxies(context))
    
        def getBody(self):
    
  192. File: ./../src/zope/fssync/metadata.py:137
                # TODO: There's no test case for this code!
                nbase = normcase(name)
                matches = [b for b in self.entries if normcase(b) == nbase]
                if matches:
    
  193. File: ./../src/zope/fssync/merger.py:153
            # TODO: This is platform dependent
            if exists(original):
                origfile = original
            else:
    
  194. File: ./../src/zope/fssync/fssync.py:206
            # TODO: Don't change the case of the header names; httplib might
            # not treat them in a properly case-insensitive manner.
            assert self.rooturl
            if not path.endswith("/"):
    
  195. File: ./../src/zope/fssync/fssync.py:222
                #XXX Chunking works only with the zserver. Twisted responds with
                #    HTTP error 400 (Bad Request); error document:
                #      Excess 4 bytes sent in chunk transfer mode
                #We use a buffer as workaround and compute the Content-Length in
    
  196. File: ./../src/zope/fssync/fssync.py:243
                #XXX If chunking works again, replace the following lines with 
                # datasource(PretendStream(conn))
                # conn.send("0\r\n\r\n")
                tmp.seek(0)
    
  197. File: ./../src/zope/fssync/fssync.py:512
                # TODO: how to recurse?
                self.dirrevert(target)
            self.metadata.flush()
            if os.path.isdir(target):
    
  198. File: ./../src/zope/server/.svn/tmp/maxsockets.py.tmp:30
        # TODO: This should be a configuration value as it takes a long time to
        # compute on Mac OSX
        return 100
        sl = []
    
  199. File: ./../src/zope/server/.svn/tmp/maxsockets.py.tmp:49
        # TODO: This should be a configuration value as it takes a long time to
        # compute on Mac OSX
        return 100
        # make a server socket
    
  200. File: ./../src/zope/server/.svn/tmp/maxsockets.py.tmp:73
        # TODO: This should be a configuration value as it takes a long time to
        # compute on Mac OSX
        return 100
        sl = []
    
  201. File: ./../src/zope/server/http/tests/.svn/tmp/test_commonaccesslogger.py.tmp:36
        # TODO: please add unit tests for other methods as well:
        #       compute_timezone_for_log
        #       log_date_string
        #       log
    
  202. File: ./../src/zope/server/http/tests/test_httpserver.py:83
                # TODO tests should be more careful to clear the socket map.
                poll(0.1)
            self.orig_map_size = len(socket_map)
            self.hook_asyncore_error()
    
  203. File: ./../src/zope/server/http/tests/test_commonaccesslogger.py:36
        # TODO: please add unit tests for other methods as well:
        #       compute_timezone_for_log
        #       log_date_string
        #       log
    
  204. File: ./../src/zope/server/logger/m_syslog.py:55
    # TODO: support named-pipe syslog.
    # [see ftp://sunsite.unc.edu/pub/Linux/system/Daemons/syslog-fifo.tar.z]
    
    # from :
    
  205. File: ./../src/zope/server/ftp/tests/test_ftpserver.py:59
                # TODO tests should be more careful to clear the socket map.
                asyncore.poll(0.1)
            self.orig_map_size = len(asyncore.socket_map)
            self.hook_asyncore_error()
    
  206. File: ./../src/zope/server/ftp/tests/test_ftpserver.py:253
            # TODO This test doesn't work.  I think it is because execute()
            #      doesn't read the whole reply.  The execeute() helper
            #      function should be fixed, but that's for another day.
            result = status_messages['HELP_START'] + '\r\n'
    
  207. File: ./../src/zope/server/ftp/server.py:363
            # TODO: we should (optionally) verify that the
            # ip number belongs to the client.  [wu-ftpd does this?]
            self.port_addr = (ip, port)
            self.reply('SUCCESS_200', 'PORT')
    
  208. File: ./../src/zope/server/maxsockets.py:30
        # TODO: This should be a configuration value as it takes a long time to
        # compute on Mac OSX
        return 100
        sl = []
    
  209. File: ./../src/zope/server/maxsockets.py:49
        # TODO: This should be a configuration value as it takes a long time to
        # compute on Mac OSX
        return 100
        # make a server socket
    
  210. File: ./../src/zope/server/maxsockets.py:73
        # TODO: This should be a configuration value as it takes a long time to
        # compute on Mac OSX
        return 100
        sl = []
    
  211. File: ./../src/zope/server/linereceiver/lineserverchannel.py:107
            # TODO: Some logging should go on here.
    
    
        def handle_error_no_close(self):
    
  212. File: ./../src/zope/security/.svn/tmp/__init__.py.tmp:20
    # TODO: There's a circular import problem with the proxy package.
    # The proxy framework needs some refactoring, but not today.
    import zope.proxy
    
    
  213. File: ./../src/zope/security/__init__.py:20
    # TODO: There's a circular import problem with the proxy package.
    # The proxy framework needs some refactoring, but not today.
    import zope.proxy
    
    
  214. File: ./../src/zope/security/checker.py:289
    # TODO: It's a bit scary above that we can pickle a proxy if access is
    # granted to __reduce__. We might want to bother to prevent this in
    # general and only allow it in this specific case.
    
    
  215. File: ./../src/zope/security/checker.py:361
        # TODO: we really need formal proxy introspection
    
        #if type(object) is Proxy:
        #    # Is this already a security proxy?
    
  216. File: ./../src/zope/security/tests/.svn/tmp/test_proxy.py.tmp:297
            # TODO: should test all inplace operators...
            P = self.c.proxy
    
            pa = P(1)
    
  217. File: ./../src/zope/security/tests/test_proxy.py:297
            # TODO: should test all inplace operators...
            P = self.c.proxy
    
            pa = P(1)
    
  218. File: ./../src/zope/security/tests/test_checker.py:334
        # TODO: write a test to see that
        # Checker.check/check_setattr handle permission
        # values that evaluate to False
    
    
  219. File: ./../src/zope/security/untrustedpython/builtins.py:61
            # TODO: dir segfaults with a seg fault due to a bas tuple
            # check in merge_class_dict in object.c. The assert macro
            # seems to be doing the wrong think. Basically, if an object
            # has bases, then bases is assumed to be a tuple.
    
  220. File: ./../src/zope/configuration/xmlconfig.py:175
                    # XXX:
                    # I hope so most internation zcml will use UTF-8 as encoding
                    # otherwise this code must be made more clever
                    src = u''.join([u"  "+l.decode('utf-8') for l in lines])
    
  221. File: ./../src/zope/index/text/tests/.svn/tmp/indexhtml.py.tmp:47
    # TODO: make a splitter more like the HTMLSplitter for TextIndex
    # signature is
    # Splitter(string, stop_words, encoding,
    #          singlechar, indexnumbers, casefolding)
    
  222. File: ./../src/zope/index/text/tests/indexhtml.py:47
    # TODO: make a splitter more like the HTMLSplitter for TextIndex
    # signature is
    # Splitter(string, stop_words, encoding,
    #          singlechar, indexnumbers, casefolding)
    
  223. File: ./../src/zope/index/keyword/.svn/tmp/index.py.tmp:46
            # TODO: Using a vocabulary might be the better choice to store
            # keywords since it would allow use to use integers instead of strings
            self._rev_index = IOBTree()
            self._num_docs = Length(0)
    
  224. File: ./../src/zope/index/keyword/index.py:46
            # TODO: Using a vocabulary might be the better choice to store
            # keywords since it would allow use to use integers instead of strings
            self._rev_index = IOBTree()
            self._num_docs = Length(0)
    
  225. File: ./../src/zope/pagetemplate/pagetemplatefile.py:65
                # TODO: Shouldn't / stripping
                # be in PageTemplate.__call__()?
                text = meta_pattern.sub("", text)
            else:
    
  226. File: ./../src/zope/pagetemplate/tests/test_ptfile.py:133
        # TODO: This reflects a case that simply isn't handled by the
        # sniffer; there are many, but it gets it right more often than
        # before.
        def donttest_sniffer_xml_simple(self):
    
  227. File: ./../src/zope/tales/tales.py:717
            # TODO: Should return None or a macro definition
            return self.evaluate(expr)
        evaluateMacro = evaluate
    
    
  228. File: ./../src/zope/tales/expressions.py:134
                    # TODO: Once we have n-ary adapters, use them.
                    if ITALESFunctionNamespace.providedBy(ob):
                        ob.setEngine(econtext)
                else:
    
  229. File: ./../src/zope/dependencytool/finddeps.py:219
            # TODO: Issue: 459, check this
            # It doesn't make sense to exit here, check why we run into this
            # and make sure this whan't happen in the future. I guess we need
            # more 'elif' case where will handle other extensions too
    
  230. File: ./../src/zope/dependencytool/finddeps.py:229
            # TODO: Issue: 459, why do we exit here? I think the dependency tool
            # should report dependeny and not exit at all. It doesn't make sense
            # to abort on any error because we should report as much as possible
            # Perhaps we should add another script like 'findmissing' or
    
  231. File: ./../src/zope/dependencytool/finddeps.py:249
    # TODO: Issue: 459, check changed constructor
    def getAllCleanedDependencies(path, zcml=False, deps=[], paths=[],
                                  packages=False):
        """Return a list of all cleaned dependencies in a path."""
        # to do here
    
        # zope and zope/app are too general to be considered.
        # Because otherwise it would just pick up zope as a dependency, but
        # nothing else. We need a way to detect packages.
    
        # there's a t east me useing windows ;-)
        if path.endswith('src/zope/') or path.endswith('src/zope/app/') or \
            path.endswith('src\\zope\\') or path.endswith('src\\zope\\app\\'):
    
  232. File: ./../src/zope/wfmc/xpdl.py:277
            # TODO This needs to be part of the contract.
            try:
                compiled = self._v_compiled
            except AttributeError:
    
  233. File: ./../src/zope/formlib/form.txt:1626
    But the form machinery can still find the correct button. # TODO: demo
    
    Dividing display of widget errors and invariant errors
    ------------------------------------------------------
    
  234. File: ./../src/zope/formlib/form.txt:1638
    # TODO
    
    
    Omitting the form prefix
    
  235. File: ./../src/zope/formlib/form.py:204
        # TODO need test
        def get(self, name):
            return self.__Widgets_widgets_dict__.get(name)
    
    
  236. File: ./../src/zope/formlib/form.py:212
        # TODO need test
        def __add__(self, other):
            widgets = self.__class__([], 0)
            widgets.__Widgets_widgets_items__ = (
    
  237. File: ./../src/zope/formlib/form.py:665
        # TODO need test
        def __add__(self, other):
            return self.__class__(*(self.actions + other.actions))
    
    
  238. File: ./../src/zope/formlib/form.py:688
    # TODO need test for this
    def availableActions(form, actions):
        result = []
        for action in actions:
    
  239. File: ./../src/zope/formlib/form.py:725
        # TODO also need to be able to show disabled actions
        def availableActions(self):
            return availableActions(self, self.actions)
    
    
  240. File: ./../src/zope/formlib/namedtemplate.py:67
    # TODO need test
    class NamedTemplatePathAdapter(object):
    
        interface.implements(zope.traversing.interfaces.IPathAdapter)
    
  241. File: ./../src/zope/testbrowser/.svn/tmp/interfaces.py.tmp:222
            # TODO: currently only implemented for select by ClientForm
            title=u"Options",
            description=u"""\
            A list of possible display values for the control.""",
    
  242. File: ./../src/zope/testbrowser/.svn/tmp/interfaces.py.tmp:229
            # TODO: currently only implemented for select by ClientForm
            title=u"Value",
            description=u"The value of the control, as rendered by the display",
            default=None,
    
  243. File: ./../src/zope/testbrowser/testing.py:91
            reason = real_response._reason # XXX add a getReason method
    
            headers = real_response.getHeaders()
            headers.sort()
    
  244. File: ./../src/zope/testbrowser/interfaces.py:222
            # TODO: currently only implemented for select by ClientForm
            title=u"Options",
            description=u"""\
            A list of possible display values for the control.""",
    
  245. File: ./../src/zope/testbrowser/interfaces.py:229
            # TODO: currently only implemented for select by ClientForm
            title=u"Value",
            description=u"The value of the control, as rendered by the display",
            default=None,
    
  246. File: ./../src/zope/interface/tests/test_odd_declarations.py:38
    # TODO: We are going to need more magic to make classProvides work with odd
    #       classes. This will work in the next iteration. For now, we'll use
    #       a different mechanism.
    
    
  247. File: ./../src/zope/interface/declarations.py:326
            # TODO: need old style __implements__ compatibility?
            # Hm, there's an __implemented__, but it's not a spec. Must be
            # an old-style declaration. Just compute a spec for it
            return Declaration(*_normalizeargs((spec, )))
    
  248. File: ./../src/zope/interface/declarations.py:339
        # TODO: need old style __implements__ compatibility?
        if spec is not None:
            # old-style __implemented__ = foo declaration
            spec = (spec, ) # tuplefy, as it might be just an int
    
  249. File: ./../src/zope/interface/adapter.py:238
        # XXX hack to fake out twisted's use of a private api.  We need to get them
        # to use the new registed method.
        def get(self, _):
            class XXXTwistedFakeOut:
    
  250. File: ./../src/zope/interface/adapter.py:419
        # TODO: add invalidation when a provided interface changes, in case
        # the interface's __iro__ has changed.  This is unlikely enough that
        # we'll take our chances for now.
        
    
  251. File: ./../src/zope/copypastemove/__init__.py:182
            self.__parent__ = object # TODO: see if we can automate this
    
        def moveTo(self, target, new_name=None):
            """Move this object to the `target` given.
    
  252. File: ./../src/zope/copypastemove/__init__.py:374
            self.__parent__ = object # TODO: see if we can automate this
    
        def copyTo(self, target, new_name=None):
            """Copy this object to the `target` given.
    
  253. File: ./../src/zope/traversing/tests/test_conveniencefunctions.py:104
            # TODO test that ++names++ and @@names work too
    
        def testTraverseNameBadValue(self):
            from zope.traversing.api import traverseName
    
  254. File: ./../src/zope/traversing/namespace.py:297
            # TODO:
            # This is here now to allow us to get site managers from a
            # separate namespace from the content. We add and etc
            # namespace to allow us to handle misc objects.  We'll apply
    
  255. File: ./../src/zope/traversing/namespace.py:310
            # TODO: lift dependency on zope.app
            if (name in ('process', 'ApplicationController')
                and IContainmentRoot.providedBy(ob)):
                # import the application controller here to avoid circular
    
  256. File: ./../src/zope/traversing/namespace.py:525
                        # TODO: I am not sure this is the best solution.  What
                        # if we want to enable tracebacks when also trying to
                        # debug a different skin?
                        skin = zope.component.getUtility(IBrowserSkinType, 'Debug')
    
  257. File: ./../src/zope/traversing/DEPENDENCIES.cfg:3
    # TODO: minimize zope.app
    zope.app
    zope.component
    zope.i18n
    
  258. File: ./../src/zope/traversing/interfaces.py:28
    #TODO this does not seem to be used anywhere. Remove it? --philiKON
    class INamespaceHandler(Interface):
    
        def __call__(name, object, request):
    
  259. File: ./../src/zope/dublincore/tests/test_dcsv.py:24
    # TODO still need tests for errors, and createMapping()
    
    
    def test_decode_empty():
    
  260. File: ./../src/zope/dublincore/xmlmetadata.py:192
            # TODO: need convert element to metadata element name
            dcelem = validator = None
            if name in dcterms.element_to_name:
                dcelem = dcterms.element_to_name[name]
    
  261. File: ./../src/zope/sendmail/tests/test_maildir.py:254
            self.assertEquals(writer._fd._mode, 'w')  # TODO or 'wb'?
            print >> writer, 'fee',
            writer.write(' fie')
            writer.writelines([' foe', ' foo'])
    
  262. File: ./../src/zope/sendmail/delivery.py:203
                        # TODO: maybe log the Message-Id of the message sent
                        self.log.info("Mail from %s to %s sent.",
                                      fromaddr, ", ".join(toaddrs))
                        # Blanket except because we don't want
    
  263. File: ./../src/zope/filerepresentation/interfaces.py:110
    # TODO: We will add ILargeReadFile and ILargeWriteFile to efficiently
    # handle large data.
    
    class IReadDirectory(IReadContainer):
    
  264. File: ./../src/zope/filerepresentation/interfaces.py:143
    # TODO: we will add additional interfaces for WebDAV and File-system
    # synchronization.
            #     (State, Token) to a item to reduce
            ToDo = {}
            Error = None
    
  265. File: ./../src/zope/testing/doctest.py:649
                                # XXX is this code (through "continue") needed?
    
                                # throw away all the prose leading up to the last
                                # footnote definition in the prose, this is so we
    
  266. File: ./../src/zope/testing/doctest.py:2220
    # XXX this test fails and I didn't do it, so just commenting it out (JBY).
    #      >>> import doctest
    #      >>> doctest._unittest_reportflags == (REPORT_NDIFF |
    #      ...                                   REPORT_ONLY_FIRST_FAILURE)
    
  267. File: ./../src/zope/testing/doctest.py:3028
    # TODO:
    # - make tracebacks show where the footnote was referenced
    # - teach script_from_examples and testsource about INTERPRET_FOOTNOTES
    # - update comments (including docstring for testfile)
    
  268. File: ./../src/zope/testing/testrunner.py:185
        # XXX There are no tests for this logging behavior.
        # It's not at all clear that the test runner should be doing this.
        configure_logging()
    
    
  269. File: ./../src/zope/testing/testrunner.py:863
                # TODO: Perhaps eat the garbage here, so that the garbage isn't
                #       printed for every subsequent test.
    
            # Did the test leave any new threads behind?
    
  270. File: ./../src/zope/testing/testrunner.py:1191
        # TODO -- really should have test of this that uses symlinks
        #         this is hard on a number of levels ...
        for dirpath, dirs, files in os.walk(dir):
            dirs.sort()
    
  271. File: ./../src/RestrictedPython/tests/before_and_after.py:169
    # XXX solutions?
    
    #def simple_slice_before():
    #    x = y[:4]
    
  272. File: ./../src/mechanize/_useragent.py:141
        # XXX
    ##     def set_timeout(self, timeout):
    ##         self._timeout = timeout
    ##     def set_http_connection_cache(self, conn_cache):
    
  273. File: ./../src/mechanize/_useragent.py:147
    ##         # XXX ATM, FTP has cache as part of handler; should it be separate?
    ##         self._ftp_conn_cache = conn_cache
    
        def set_handled_schemes(self, schemes):
    
  274. File: ./../src/mechanize/_useragent.py:186
        # XXX could use Greg Stein's httpx for some of this instead?
        # or httplib2??
        def set_proxies(self, proxies):
            """Set a dictionary mapping URL scheme to proxy specification, or None.
    
  275. File: ./../src/mechanize/_mechanize.py:37
            response = _response  # XXX move Browser._response into this class?
            while n > 0 or response is None:
                try:
                    request, response = self._history.pop()
    
  276. File: ./../src/mechanize/_mechanize.py:210
    ##             # XXX I don't seem to have an example of exactly socket.error being
    ##             #  raised, only socket.gaierror...
    ##             # I don't want to start fixing these here, though, since this is a
    ##             # subclass of OpenerDirector, and it would break old code.  Even in
    
  277. File: ./../src/mechanize/_pullparser.py:295
            # XXX should this call self.error instead?
            #self.error("unknown declaration: " + `data`)
            self._tokenstack.append(Token("decl", data))
        def handle_pi(self, data):
    
  278. File: ./../src/mechanize/_auth.py:194
        # XXX there can actually be multiple auth-schemes in a
        # www-authenticate header.  should probably be a lot more careful
        # in parsing them to extract multiple alternatives
    
    
  279. File: ./../src/mechanize/_auth.py:207
            # XXX could be multiple headers
            authreq = headers.get(authreq, None)
            if authreq:
                mo = AbstractBasicAuthHandler.rx.search(authreq)
    
  280. File: ./../src/mechanize/_auth.py:270
        # XXX The client does not inspect the Authentication-Info header
        # in a successful response.
    
        # a mock server that just generates a static set of challenges.
    
    
        def __init__(self, passwd=None):
            if passwd is None:
    
  281. File: ./../src/mechanize/_auth.py:348
            # XXX not implemented yet
            if req.has_data():
                entdig = self.get_entity_digest(req.get_data(), chal)
            else:
    
  282. File: ./../src/mechanize/_auth.py:356
                            # XXX selector: what about proxies and full urls
                            req.get_selector())
            if qop == 'auth':
                self.nonce_count += 1
    
  283. File: ./../src/mechanize/_auth.py:367
                # XXX handle auth-int.
                pass
    
    
            base = 'username="%s", realm="%s", nonce="%s", uri="%s", ' \
                   'response="%s"' % (user, realm, nonce, req.get_selector(),
    
  284. File: ./../src/mechanize/_auth.py:390
            # XXX MD5-sess
            KD = lambda s, d: H("%s:%s" % (s, d))
            return H, KD
    
    
  285. File: ./../src/mechanize/_auth.py:395
            # XXX not implemented yet
            return None
    
    
    
  286. File: ./../src/mechanize/_html.py:17
    ## # XXXX miserable hack
    ## def urljoin(base, url):
    ##     if url.startswith("?"):
    ##         return base+url
    
  287. File: ./../src/mechanize/_html.py:116
            # XXX encoding
            return _is_html(ct_hdrs, url, allow_xhtml)
        return is_html
    
    
  288. File: ./../src/mechanize/_html.py:216
                # XXX use attr_encoding for ref'd doc if that doc does not provide
                #  one by other means
                #attr_encoding = attrs.get("charset")
                if not url:
                    # Probably an  link or .
                    # For our purposes a link is something with a URL, so ignore
    
  289. File: ./../src/mechanize/_urllib2_support.py:101
            # XXX Probably want to forget about the state of the current
            # request, although that might interact poorly with other
            # handlers that also use handler-specific request attributes
            new = self.redirect_request(newurl, req, fp, code, msg, headers)
    
  290. File: ./../src/mechanize/_urllib2_support.py:153
    # XXX would self.reset() work, instead of raising this exception?
    class EndOfHeadError(Exception): pass
    class AbstractHeadParser:
        # only these elements are allowed in or before HEAD of document
    
  291. File: ./../src/mechanize/_urllib2_support.py:597
            except socket.error, err: # XXX what error?
                raise URLError(err)
    
            # Pick apart the HTTPResponse object to get the addinfourl
    
  292. File: ./../src/mechanize/_urllib2_support.py:608
            # XXX It might be better to extract the read buffering code
            # out of socket._fileobject() and into a base class.
    
            r.recv = r.read
    
  293. File: ./../src/mechanize/_clientcookie.py:76
        # XXX
        # This may well be wrong.  Which RFC is HDN defined in, if any (for
        #  the purposes of RFC 2965)?
        # For the current implementation, what about IPv6?  Remember to look
    
  294. File: ./../src/mechanize/_clientcookie.py:1071
                # XXX
                # What should it be if multiple matching Set-Cookie headers have
                #  different versions themselves?
                # Answer: there is no answer; was supposed to be settled by
    
  295. File: ./../src/mechanize/_clientcookie.py:1227
                        # XXX Strictly you're supposed to follow RFC 2616
                        #   age-calculation rules.  Remember that zero Max-Age is a
                        #   is a request to discard (old and new) cookie, though.
                        k = "expires"
    
  296. File: ./../src/mechanize/_util.py:311
            # XXX there's an extra bit of the timezone I'm ignoring here: is
            #   this the right thing to do?
            yr, mon, day, hr, min, sec, tz, _ = m.groups()
        else:
    
  297. File: ./../src/mechanize/_util.py:320
    # XXX Andrew Dalke kindly sent me a similar class in response to my request on
    # comp.lang.python, which I then proceeded to lose.  I wrote this class
    # instead, but I think he's released his code publicly since, could pinch the
    # tests from it, at least...
    
  298. File: ./../src/mechanize/_util.py:443
                # XXX oops, wrapped file-like-object isn't valid, ignore it
                return ''
    
            self.__cache.seek(0, 2)
    
  299. File: ./../src/mechanize/_util.py:623
            # XXXX um, 4. refuse to pickle unless .close()d.  This is better,
            #  actually ("errors should never pass silently").  Pickling doesn't
            #  work anyway ATM, because of http://python.org/sf/1144636 so fix
            #  this later
    
  300. File: ./../src/mechanize/_msiecookiejar.py:12
    # XXX names and comments are not great here
    
    import os, re, string, time, struct, logging
    if os.name == "nt":
    
  301. File: ./../src/mechanize/_msiecookiejar.py:171
                # XXX is there other stuff in here? -- eg. comment, commentURL?
                c = Cookie(0,
                           cookie["KEY"], cookie["VALUE"],
                           None, False,
    
  302. File: ./../src/mechanize/_opener.py:112
            # XXX why does self.handlers need to be sorted?
            bisect.insort(self.handlers, handler)
            handler.add_parent(self)
            self._handler_index_valid = False
    
  303. File: ./../src/mechanize/_opener.py:179
            # XXX could be cleaned up
            for lookup in [process_request, process_response]:
                for scheme, handlers in lookup.iteritems():
                    lookup[scheme] = handlers
    
  304. File: ./../src/mechanize/_opener.py:218
            # XXX should we allow a Processor to change the URL scheme
            #   of the request?
            request_processors = set(self.process_request.get(req_scheme, []))
            request_processors.update(self._any_request)
    
  305. File: ./../src/mechanize/_opener.py:251
                # XXX http[s] protocols are special-cased
                dict = self.handle_error['http'] # https is not different than http
                proto = args[2]  # YUCK!
                meth_name = 'http_error_%s' % proto
    
  306. File: ./../src/docutils/writers/latex2e/__init__.py:187
            'no': 'norsk',     #XXX added by hand ( forget about nynorsk?)
            'sl': 'slovenian',
            'af': 'afrikaans',
            'bg': 'bulgarian',
    
  307. File: ./../src/docutils/writers/latex2e/__init__.py:201
            'de': 'ngerman',  #XXX rather than german
            # ngerman, naustrian, german, germanb, austrian
            'el': 'greek',
            'en': 'english',
    
  308. File: ./../src/docutils/writers/latex2e/__init__.py:486
                    # TODO merge clines
                    while 1:
                        try:
                            c_start = rowspans.pop()
    
  309. File: ./../src/docutils/writers/latex2e/__init__.py:528
        # TODO: use mixins for different implementations.
        # list environment for option-list. else tabularx
        use_optionlist_for_option_list = 1
        # list environment for docinfo. else tabularx
    
  310. File: ./../src/docutils/writers/latex2e/__init__.py:997
            # TODO maybe use cite bibitems
            if self._use_latex_citations:
                self.context.append(len(self.body))
            else:
    
  311. File: ./../src/docutils/writers/latex2e/__init__.py:1195
            # TODO insertion point of bibliography should none automatic.
            if self._use_latex_citations and len(self._bibitems)>0:
                widest_label = ""
                for bi in self._bibitems:
    
  312. File: ./../src/docutils/writers/latex2e/__init__.py:1522
                    pass                    # XXX complain here?
            if not inline:
                pre.append('\n')
                post.append('\n')
    
  313. File: ./../src/docutils/writers/latex2e/__init__.py:1906
            # TODO longtable supports firsthead and lastfoot too.
            self.body.extend(self.active_table.visit_thead())
    
        def depart_thead(self, node):
    
  314. File: ./../src/docutils/writers/latex2e/__init__.py:1961
            # TODO: for admonition titles before the first section
            # either specify every possible node or ... ?
            elif isinstance(node.parent, nodes.sidebar) \
            or isinstance(node.parent, nodes.admonition):
    
  315. File: ./../src/docutils/writers/newlatex2e/__init__.py:468
            # XXX needs cleanup.
            if (len(node) and (isinstance(node[-1], nodes.TextElement) or
                               isinstance(node[-1], nodes.Text)) and
                node.parent.index(node) == len(node.parent) - 1):
    
  316. File: ./../src/docutils/writers/newlatex2e/__init__.py:546
                # Todo: Add empty cells below rowspanning cell and issue
                # warning instead of severe.
            if node.hasattr('morecols'):
                # The author got a headache trying to implement
    
  317. File: ./../src/docutils/writers/newlatex2e/__init__.py:554
                    # Todo: Same as above.
                # The number of columns this entry spans (as a string).
                colspan = int(node['morecols']) + 1
                del node['morecols']
    
  318. File: ./../src/ZConfig/tests/test_loader.py:241
        # XXX Not sure if this is the best approach for these.  These
        # tests make sure that the error reported by ZConfig for missing
        # resources is handled in a consistent way.  Since ZConfig uses
        # urllib2.urlopen() for opening all resources, what we do is
    
  319. File: ./../src/ZConfig/components/logger/tests/test_logger.py:44
        # XXX This tries to save and restore the state of logging around
        # the test.  Somewhat surgical; there may be a better way.
    
        name = None
    
  320. File: ./../src/ZConfig/components/logger/tests/test_logger.py:217
            # XXX The "url" attribute of the handler is misnamed; it
            # really means just the selector portion of the URL.
            self.assertEqual(handler.url, "/")
            self.assertEqual(handler.level, logging.ERROR)
    
  321. File: ./../src/ZConfig/components/logger/tests/test_logger.py:233
            # XXX The "url" attribute of the handler is misnamed; it
            # really means just the selector portion of the URL.
            self.assertEqual(handler.url, "/log/")
            self.assertEqual(handler.level, logging.NOTSET)
    
  322. File: ./../src/ZConfig/loader.py:89
            # XXX This should be replaced to use a local cache for remote
            # resources.  The policy needs to support both re-retrieve on
            # change and provide the cached resource when the remote
            # resource is not accessible.
    
  323. File: ./../src/ZConfig/loader.py:134
                # XXX This assumes that one-character scheme identifiers
                # are always Windows drive letters; I don't know of any
                # one-character scheme identifiers.
                scheme, rest = urllib.splittype(s)
    
  324. File: ./../src/persistent/tests/testPersistent.py:254
        # TODO:  Need to decide how __setattr__ and __delattr__ should work,
        # then write tests.
    
    
    
  325. File: ./../src/persistent/wref.py:237
        # TODO:  It's expensive trying to load dead objects from the database.
        # It would be helpful if the data manager/connection cached these.
    
        def __init__(self, adict=None, **kwargs):
    
  326. File: ./../src/persistent/wref.py:300
        # TODO:  May need more methods, and tests.
    
  327. File: ./../src/persistent/interfaces.py:258
    # TODO:  document conflict resolution.
    
    class IPersistentDataManager(Interface):
        """Provide services for managing persistent state.
    
  328. File: ./../src/transaction/interfaces.py:300
        # TODO: deprecate this for 3.6.
        def register(object):
            """Register the given object for transaction control."""
    
    
  329. File: ./../src/transaction/_transaction.py:286
                # TODO: Should it be possible to join a committing transaction?
                # I think some users want it.
                raise ValueError("expected txn status %r or %r, but it's %r" % (
                                 Status.ACTIVE, Status.DOOMED, self.status))
            # be better to use interfaces.  If this is a ZODB4-style
            # resource manager, it needs to be adapted, too.
            if myhasattr(resource, "prepare"):
                resource = DataManagerAdapter(resource)
            self._resources.append(resource)
    
    
  330. File: ./../src/transaction/_transaction.py:370
                # TODO: comment out this expensive assert later
                # Use id() to guard against proxies.
                assert id(obj) not in map(id, adapter.objects)
                adapter.objects.append(obj)
    
  331. File: ./../src/transaction/_transaction.py:394
                # TODO deprecate subtransactions
                self._subtransaction_savepoint = self.savepoint(optimistic=True)
                return
    
    
  332. File: ./../src/transaction/_transaction.py:491
                    # XXX should we take further actions here ?
                    self.log.error("Error in abort() on manager %s",
                                   rm, exc_info=sys.exc_info())
            self._after_commit = []
    
  333. File: ./../src/transaction/_transaction.py:516
                    # TODO: do we need to make this warning stronger?
                    # to stop committing transactions at this point.
                    self.log.critical("A storage error occurred during the second "
                                      "phase of the two-phase commit.  Resources "
    
  334. File: ./../src/transaction/_transaction.py:559
                # TODO deprecate subtransactions.
                if not self._subtransaction_savepoint:
                    raise interfaces.InvalidSavepointRollbackError
                if self._subtransaction_savepoint.valid:
    
  335. File: ./../src/transaction/_transaction.py:609
    # TODO: We need a better name for the adapters.
    
    class MultiObjectResourceAdapter(object):
        """Adapt the old-style register() call to the new-style join().
    
  336. File: ./../src/transaction/_transaction.py:680
    # TODO: deprecate for 3.6.
    class DataManagerAdapter(object):
        """Adapt zodb 4-style data managers to zodb3 style
    
    
  337. File: ./../src/transaction/_transaction.py:696
        # TODO: I'm not sure why commit() doesn't do anything
    
        def commit(self, transaction):
            # We don't do anything here because ZODB4-style data managers
    
  338. File: ./../src/ZEO/tests/multi.py:15
    # TODO:  This code is currently broken.
    
    import ZODB, ZODB.DB, ZODB.FileStorage, ZODB.POSException
    import persistent
    
  339. File: ./../src/ZEO/tests/multi.py:151
        # TODO:  Should check that the results are consistent!
    
        print "Total time:", t2 - t0
        print "Server start time", t1 - t0
    
  340. File: ./../src/ZEO/tests/test_cache.py:126
            # TODO:  Need to make sure eviction of non-current data
            # and of version data are handled correctly.
    
        def testSerialization(self):
    
  341. File: ./../src/ZEO/tests/InvalidationTests.py:504
        # TODO:  Temporarily disabled.  I know it fails, and there's no point
        # getting an endless number of reports about that.
        def xxxcheckConcurrentUpdatesInVersions(self):
            self._storage = storage1 = self.openClientStorage()
    
  342. File: ./../src/ZEO/tests/ConnectionTests.py:345
        # TODO:  Compare checkReconnectXXX() here to checkReconnection()
        # further down.  Is the code here hopelessly naive, or is
        # checkReconnection() overwrought?
    
    
  343. File: ./../src/ZEO/tests/ConnectionTests.py:613
        # TODO: with the current ZEO code, this occasionally fails.
        # That's the point of this test. :-)
    
        def NOcheckMultiStorageTransaction(self):
    
  344. File: ./../src/ZEO/tests/stress.py:19
    # TODO: This code is currently broken.
    
    import transaction
    import ZODB
    
  345. File: ./../src/ZEO/tests/testMonitor.py:78
            # TODO: should put this in setUp.
            self.storage = self.openClientStorage()
            s = self.get_monitor_output()
            self.storage.close()
    
  346. File: ./../src/ZEO/zrpc/client.py:261
            # TODO: make timeout configurable?
            attempt_timeout = 5
            while not self.stopped:
                success = self.try_connecting(attempt_timeout)
    
  347. File: ./../src/ZEO/zrpc/client.py:382
                # TODO: should check deadline
    
    
    class ConnectWrapper:
    
  348. File: ./../src/ZEO/zrpc/connection.py:554
            # TODO:  This is hardly "secure".
            if name.startswith('_'):
                return None
            return hasattr(self.obj, name)
    
  349. File: ./../src/ZEO/zrpc/connection.py:679
            # TODO:  If we are not in async mode, this will cause dead
            # Connections to be leaked.
    
        def set_async(self, map):
    
  350. File: ./../src/ZEO/zrpc/smac.py:136
        # TODO: avoid expensive getattr calls?  Can't remember exactly what
        # this comment was supposed to mean, but it has something to do
        # with the way asyncore uses getattr and uses if sock:
        def __nonzero__(self):
    
  351. File: ./../src/ZEO/zrpc/marshal.py:75
        # TODO:  is there a better way to do this?
        if type(r) == types.ClassType and issubclass(r, Exception):
            return r
    
    
  352. File: ./../src/ZEO/StorageServer.py:52
    # TODO:  This used to say "ZSS", which is now implied in the logger name.
    # Can this be either set to str(os.getpid()) (if that makes sense) or removed?
    _label = "" # default label used for logging.
    
    
  353. File: ./../src/ZEO/StorageServer.py:480
            # XXX check that underlying storage supports blobs
            key = (oid, id)
            if key not in self.blob_transfer:
                tempname = mktemp()
    
  354. File: ./../src/ZEO/StorageServer.py:485
                self.blob_transfer[key] = (tempname, tempfile)   # XXX Force close and remove them when Storage closes
            else:
                tempname, tempfile = self.blob_transfer[key]
    
    
  355. File: ./../src/ZEO/cache.py:373
            # TODO: Want to fetch object without marking it as accessed.
            o = self.fc.access((oid, cur_tid))
            assert o is not None
            assert o.end_tid is None  # i.e., o was current
    
  356. File: ./../src/ZEO/cache.py:378
                # TODO:  Since we asserted o is not None above, this block
                # should be removed; waiting on time to prove it can't happen.
                return
            o.end_tid = tid
    
  357. File: ./../src/ZEO/ClientStorage.py:276
            # TODO:  If serial number matches transaction id, then there is
            # no need to have all this extra infrastructure for handling
            # serial numbers.  The vote call can just return the tid.
            # If there is a conflict error, we can't have a special method
    
  358. File: ./../src/ZEO/ClientStorage.py:317
            # XXX need to check for POSIX-ness here
            if blob_dir is not None:
                self.fshelper = FilesystemHelper(blob_dir)
                self.fshelper.create()
    
  359. File: ./../src/ZEO/ClientStorage.py:336
            # TODO:  maybe there's a better time to open the cache?  Unclear.
            self._cache.open()
    
            self._rpc_mgr = self.ConnectionManagerClass(addr, self,
    
  360. File: ./../src/ZEO/ClientStorage.py:449
            # TODO:  Should we check the protocol version here?
            self._conn_is_read_only = 0
            stub = self.StorageServerStubClass(conn)
    
    
  361. File: ./../src/ZEO/ClientStorage.py:490
            # TODO:  report whether we get a read-only connection.
            if self._connection is not None:
                reconnect = 1
            else:
    
  362. File: ./../src/ZEO/ClientStorage.py:597
            # TODO:  should batch these operations for efficiency; would need
            # to acquire lock ...
            for oid, tid, version in self._cache.contents():
                server.verify(oid, version, tid)
    
  363. File: ./../src/ZEO/ClientStorage.py:627
            # TODO:  Is this method used?
            return self._info['length']
    
        def getName(self):
    
  364. File: ./../src/ZEO/ClientStorage.py:864
            # TODO: Is it okay that read-only connections allow pack()?
            # rf argument ignored; server will provide its own implementation
            if t is None:
                t = time.time()
    
  365. File: ./../src/ZEO/ClientStorage.py:933
            # XXX will fail on Windows if file is open
            os.rename(tempfilename, blob_filename)
            return blob_filename
    
    
  366. File: ./../src/ZEO/runzeo.py:260
            # TODO: this used to reinitialize zLOG. How do I achieve
            # the same effect with Python's logging package?
            # Should we restart as with SIGHUP?
            log("received SIGUSR2, but it was not handled!", level=logging.WARNING)
    
  367. File: ./../src/ZEO/scripts/manual_tests/testzeopack.py:16
    # TODO:  The forker interface isn't clearly defined.  It's different on
    # different branches of ZEO.  This will break someday.
    
    # something to do.
    
    class PackerTests(StorageTestBase):
    
  368. File: ./../src/ZEO/scripts/zeoup.py:60
            # TODO:  should do retries w/ exponential backoff.
            cs = ClientStorage(addr, storage=storage, wait=0,
                               read_only=(not write))
        else:
    
  369. File: ./../src/ZODB/tests/Synchronization.py:145
        # TODO:  how to check undo?
    
  370. File: ./../src/ZODB/tests/TransactionalUndoStorage.py:606
                # TODO:  Is _cache supposed to have a clear() method, or not?
                # cn._cache.clear()
    
                # The last undo set the value to 3 and pack should
    
  371. File: ./../src/ZODB/tests/testpersistentclass.py:26
    # XXX need to update files to get newer testing package
    class FakeModule:
        def __init__(self, name, dict):
            self.__dict__ = dict
    
  372. File: ./../src/ZODB/tests/testCache.py:110
        # TODO:  not really sure how to do a black box test of the cache.
        # Should the full sweep and minimize calls always remove things?
    
        def checkFullSweep(self):
    
  373. File: ./../src/ZODB/tests/testCache.py:178
        # TODO:  don't have an explicit test for incrgc, because the
        # connection and database call it internally.
        # Same for the get and invalidate methods.
    
    
  374. File: ./../src/ZODB/tests/testTimeStamp.py:107
        # TODO:  should test for bogus inputs to TimeStamp constructor
    
        def checkTimeStamp(self):
            # Alternate test suite
    
  375. File: ./../src/ZODB/tests/testDemoStorage.py:39
            # TODO:  Need to implement a real loadBefore for DemoStorage?
            pass
    
        def checkLoadBeforeVersion(self):
            pass
    
        # the next three pack tests depend on undo
    
  376. File: ./../src/ZODB/tests/testPersistentMapping.py:63
        # TODO:  This test fails in ZODB 3.3a1.  It's making some assumption(s)
        # about pickles that aren't true.  Hard to say when it stopped working,
        # because this entire test suite hasn't been run for a long time, due to
        # a mysterious "return None" at the start of the test_suite() function
    
  377. File: ./../src/ZODB/tests/IteratorStorage.py:130
            # TODO:  Try this test with logging enabled.  If you see something
            # like
            #
            # ZODB FS FS21 warn: FileStorageTests.fs truncated, possibly due to
    
  378. File: ./../src/ZODB/tests/RevisionStorage.py:175
        # TODO:  There are other edge cases to handle, including pack.
    
  379. File: ./../src/ZODB/FileStorage/fsdump.py:67
        # TODO:  Should revise this class to use FileStorageFormatter.
    
        def __init__(self, path, dest=None):
            self.file = open(path, "rb")
    
  380. File: ./../src/ZODB/FileStorage/FileStorage.py:216
            # TODO:  Probably better to junk this and redefine _index as mapping
            # oid to (offset, tid) pair, via a new memory-efficient BTree type.
            self._oid2tid = oid2tid
            # oid->tid map to transactionally add to _oid2tid.
    
  381. File: ./../src/ZODB/FileStorage/FileStorage.py:828
                # TODO:  Not sure the following is always true:
                # The previous record is not for this version, yet we
                # have a backpointer to it.  The current record must
                # be an undo of an abort or commit, so the backpointer
    
  382. File: ./../src/ZODB/FileStorage/FileStorage.py:1192
                    # TODO:  This seek shouldn't be necessary, but some other
                    # bit of code is messing with the file pointer.
                    assert self._tfile.tell() == here - base, (here, base,
                                                               self._tfile.tell())
    
  383. File: ./../src/ZODB/FileStorage/fspack.py:285
                # TODO:  put exceptions in a separate module.
                from ZODB.FileStorage.FileStorage import RedundantPackWarning
                raise RedundantPackWarning(
                    "The database has already been packed to a later time"
    
  384. File: ./../src/ZODB/FileStorage/fspack.py:480
            # TODO:  Should add sanity checking to pack.
    
            self.gc.findReachable()
    
    
  385. File: ./../src/ZODB/FileStorage/fspack.py:485
            # TODO:  rename from _tfile to something clearer.
            self._tfile = open(self._name + ".pack", "w+b")
            self._file.seek(0)
            self._tfile.write(self._file.read(self._metadata_size))
    
  386. File: ./../src/ZODB/BaseStorage.py:345
                # TODO: The filter argument to history() only appears to be
                # supported by FileStorage.  Perhaps it shouldn't be used.
                L = self.history(oid, "", n, lambda d: not d["version"])
                if not L:
    
  387. File: ./../src/ZODB/Connection.py:249
        # TODO: we should test what happens when cacheGC is called mid-transaction.
        def cacheGC(self):
            """Reduce cache size to target size."""
            self._cache.incrgc()
    
  388. File: ./../src/ZODB/Connection.py:471
                # TODO: There is a potential problem lurking for persistent
                # classes.  Suppose we have an invalidation of a persistent
                # class and of an instance.  If the instance is
                # invalidated first and if the invalidation logic uses
    
  389. File: ./../src/ZODB/Connection.py:632
                    # TODO:  Deprecate, then remove, this.
                    if hasattr(obj, 'aq_base'):
                        self._cache[oid] = obj.aq_base
                    else:
    
  390. File: ./../src/ZODB/Connection.py:991
            # TODO:  Why do we go to all the trouble of setting _db and
            # other attributes on open and clearing them on close?
            # A Connection is only ever associated with a single DB
            # and Storage.
    
  391. File: ./../src/ZODB/Connection.py:1088
                # XXX what to do about IBlobStorages?
                tmpstore = TmpStore(self._version, self._normal_storage)
                self._savepoint_storage = tmpstore
                self._storage = self._savepoint_storage
    
  392. File: ./../src/ZODB/Connection.py:1256
            assert isinstance(serial, str) # XXX in theory serials could be 
                                           # something else
    
            targetpath = self._getBlobPath(oid)
    
  393. File: ./../src/ZODB/DemoStorage.py:423
                # TODO:  This packing algorithm is flawed. It ignores
                # references from non-current records after the pack
                # time.
    
    
  394. File: ./../src/ZODB/transact.py:37
        # TODO:  deal with ZEO disconnected errors?
    
        def g(*args, **kwargs):
            n = retries
    
  395. File: ./../src/ZODB/interfaces.py:242
        # TODO:  should this accept all the arguments one may pass to DB.open()?
        def get_connection(database_name):
            """Return a Connection for the named database.
    
    
  396. File: ./../src/ZODB/DB.py:128
                # TODO:  Perhaps it would be better to break the reference
                # cycles between `c` and `c._cache`, so that refcounting reclaims
                # both right now.  But if user code _does_ have a strong
                # reference to `c` now, breaking the cycle would not reclaim `c`
    
  397. File: ./../src/ZODB/DB.py:298
                    # TODO:  Figure out exactly which objects are involved in the
                    # cycle.
                    connection.__dict__.clear()
                    return
    
  398. File: ./../src/ZODB/serialize.py:505
            # TODO: should be done by connection
            obj._p_oid = oid
            obj._p_jar = self._conn
            # When an object is created, it is put in the UPTODATE
    
  399. File: ./../src/ZODB/serialize.py:518
            # TODO, make connection _cache attr public
            reader = ObjectReader(conn, conn._cache, self._factory)
            return reader.load_persistent(oid, klass)
    
    
  400. File: ./../src/ZODB/serialize.py:541
            # TODO, make connection _cache attr public
            reader = ObjectReader(conn, conn._cache, self._factory)
            return reader.load_oid(oid)
    
    # different branches of ZEO.  This will break someday.
    
    # something to do.
    
    class PackerTests(StorageTestBase):
    
  401. File: ./../src/ZODB/scripts/simul.py:830
            # XXX For now, don't evict pages if the new version of the object
            # is big enough to require eviction.
            node = self.cache.get(oid)
            if node is None or node.kind is a1out:
    
  402. File: ./../src/ZODB/scripts/simul.py:890
            # XXX Should an invalidation to a1out count?
            if node.kind is a1out:
                return
            node.linkbefore(self.a1out)
    
  403. File: ./../src/ZODB/scripts/simul.py:965
            # XXX multiply computed adjustments to p by walk_factor
            self.walk_factor = 500
    
            # statistics
    
  404. File: ./../src/ZODB/scripts/simul.py:1079
                        # XXX hack, apparently we can't get rid of anything else
                        break
                    prev = need
    
    
  405. File: ./../src/ZODB/scripts/simul.py:1118
                    # XXX need a better min than 1?
    ##                print "adapt+", max(1, self.lruB_size // self.fifoB_size)
                    delta = max(1, self.lruB_size / max(1, self.fifoB_size))
                    self.p += delta * self.walk_factor
    
  406. File: ./../src/ZODB/scripts/simul.py:1140
                    # XXX need a better min than 1?
    ##                print "adapt-", max(1, self.fifoB_size // self.lruB_size)
                    delta = max(1, self.fifoB_size / max(1, self.lruB_size))
                    self.p -= delta * self.walk_factor
    
  407. File: ./../src/ZODB/Blobs/Blob.py:277
        # XXX these files should be created in the same partition as
        # the storage later puts them to avoid copying them ...
    
        def __init__(self, name, mode, blob):
    
  408. File: ./../src/ZODB/Blobs/Blob.py:305
            # XXX we need to ensure that the file is closed at object
            # expiration or our blob's refcount won't be decremented.
            # This probably needs some work; I don't know if the names
            # 'BlobFile' or 'super' will be available at program exit, but
    
  409. File: ./../src/ZODB/Blobs/BlobStorage.py:50
            # XXX Log warning if storage is ClientStorage
            SpecificationDecoratorBase.__init__(self, storage)
            self.fshelper = FilesystemHelper(base_directory)
            self.fshelper.create()
    
  410. File: ./../src/ZODB/Blobs/BlobStorage.py:67
            assert isinstance(serial, str) # XXX in theory serials could be 
                                           # something else
    
            # the user may not have called "open" on the blob object,
    
  411. File: ./../src/ZODB/Blobs/BlobStorage.py:82
                    # XXX if oid already in there, something is really hosed.
                    # The underlying storage should have complained anyway
                    self.dirty_oids.append((oid, serial))
                finally:
    
  412. File: ./../src/ZODB/Blobs/BlobStorage.py:126
            # XXX we should be tolerant of "garbage" directories/files in
            # the base_directory here.
    
            base_dir = self.fshelper.base_dir
    
  413. File: ./../src/ZODB/Blobs/interfaces.py:24
        # XXX need a method to initialize the blob from the storage
        # this means a) setting the _p_blob_data filename and b) putting
        # the current data in that file
    
    
  414. File: ./../src/twisted/python/filepath.py:364
            # XXX TODO: 'name' attribute of returned files is not mutable or
            # settable via fdopen, so this file is slighly less functional than the
            # one returned from 'open' by default.  send a patch to Python...
    
    
  415. File: ./../src/twisted/python/filepath.py:381
            # XXX TODO: *thorough* audit and documentation of the exact desired
            # semantics of this code.  Right now the behavior of existent
            # destination symlinks is convenient, and quite possibly correct, but
            # its security properties need to be explained.
    
  416. File: ./../src/twisted/python/filepath.py:395
                    # XXX TODO: optionally use os.open, os.read and O_DIRECT and
                    # use os.fstatvfs to determine chunk sizes and make
                    # *****sure**** copy is page-atomic; the following is good
                    # enough for 99.9% of everybody and won't take a week to audit
    
  417. File: ./../src/twisted/python/plugin.py:133
        # XXX Some people claim to have found non-strings in sys.path (an empty
        # list, in particular).  Instead of tracking down the cause for their
        # presence, they decided it was better to discard them unconditionally
        # without further investigation.  At some point, someone should track
    
  418. File: ./../src/twisted/python/usage.py:335
                    # XXX: This won't raise a TypeError if it's called
                    # with a value when it shouldn't be.
                    fn = lambda name, value=None, m=method: m()
    
    
  419. File: ./../src/twisted/python/usage.py:485
        # XXX: sanity check to make sure we have a sane combination of keys.
    
        maxOptLen = 0
        for opt in optList:
    
  420. File: ./../src/twisted/python/usage.py:498
        # XXX - impose some sane minimum limit.
        # Then if we don't have enough room for the option and the doc
        # to share one line, they can take turns on alternating lines.
    
    
  421. File: ./../src/twisted/python/util.py:326
    # XXX
    # This does not belong here
    # But where does it belong?
    
    
  422. File: ./../src/twisted/python/util.py:548
            #XXX Maybe get rid of this, and rather use hasattr()s
            if not isinstance(other, self.__class__):
                return False
            for attr in self.compareAttributes:
    
  423. File: ./../src/twisted/python/failure.py:287
                # XXX: This is a band-aid.  I can't figure out where these
                # (failure.stack is None) instances are coming from.
                c['stack'] = [
                    [
    
  424. File: ./../src/twisted/python/failure.py:357
                # TODO: indentation for chained failures?
                file.write(" (chained Failure)\n")
                self.value.printTraceback(file, elideFrameworkCode, detail)
            if detail == 'verbose':
    
  425. File: ./../src/twisted/python/lockfile.py:26
        # XXX Implement an atomic thingamajig for win32
        import shutil
        def symlink(value, filename):
            newlinkname = filename+"."+unique()+'.newlink'
    
  426. File: ./../src/twisted/python/win32.py:35
    # XXX fix this to use python's builtin _winreg?
    
    def getProgramsMenuPath():
        """Get the path to the Programs menu.
    
  427. File: ./../src/twisted/python/modules.py:147
                        # TODO: this should be a little choosier about which path entry
                        # it selects first, and it should do all the .so checking and
                        # crud
                        potentialBasename = potentialTopLevel.basename()[:-len(ext)]
    
  428. File: ./../src/twisted/python/zippath.py:95
            # XXX NOTE: This API isn't a very good idea on filepath, but it's even
            # less meaningful here.
            return self.parent().path
    
    
  429. File: ./../src/twisted/manhole/ui/gtkmanhole.py:6
    # TODO:
    #  * send script
    #  * replace method
    #  * save readline history
    
  430. File: ./../src/twisted/manhole/ui/gtk2manhole.py:26
    # TODO:
    #  Make wrap-mode a run-time option.
    #  Explorer.
    #  Code doesn't cleanly handle opening a second connection.  Fix that.
    
  431. File: ./../src/twisted/manhole/ui/gtk2manhole.py:126
    # TODO: Factor Python console stuff back out to pywidgets.
    
    class ConsoleOutput:
        _willScroll = None
    
  432. File: ./../src/twisted/manhole/ui/gtk2manhole.py:134
            # TODO: Make this a singleton tag table.
            for name, props in tagdefs.iteritems():
                tag = self.buffer.create_tag(name)
                # This can be done in the constructor in newer pygtk (post 1.99.14)
    
  433. File: ./../src/twisted/manhole/ui/gtk2manhole.py:149
            # XXX: It seems weird to have to do this thing with always applying
            # a 'default' tag.  Can't we change the fundamental look instead?
            tags = ["default"]
            if kind is not None:
    
  434. File: ./../src/twisted/manhole/ui/gtk2manhole.py:262
                # TODO: Componentize!
                self.toplevel.output.append(str(e), "exception")
            except (OverflowError, ValueError), e:
                self.toplevel.output.append(str(e), "exception")
    
  435. File: ./../src/twisted/manhole/ui/gtk2manhole.py:312
            # TODO: Componentize better!
            try:
                return self.toplevel.getComponent(IManholeClient).do(text)
            except OfflineError:
    
  436. File: ./../src/twisted/manhole/ui/pywidgets.py:59
            # TODO: make key bindings easier to customize.
    
            stopSignal = False
            # ASSUMPTION: Assume Meta == mod4
    
  437. File: ./../src/twisted/manhole/ui/pywidgets.py:236
                    # XXX: You'd think we'd use style.bg instead of 'None'
                    # here, but that doesn't seem to match the color of
                    # the backdrop.
                    self.insert(style.font, style.fg[gtk.STATE_NORMAL],
    
  438. File: ./../src/twisted/manhole/ui/gtkrc:10
        # XXX: We should include a bg[NORMAL] line here, but doing so 
        # messes things up as it doesn't seem to set the color of the
        # backdrop.
    }
    
  439. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:11
    # TODO:
    #  gzigzag-style navigation
    
    class SillyModule:
    
  440. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:89
            # XXX: For some reason, the 'canvas' and 'parent' properties
            # of CanvasItems aren't accessible thorugh pygnome.
            Explorer.canvas = self
    
    
  441. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:258
            # TODO:
            #  Collapse me
            #  Movable/resizeable me
            #  Destroy me
    
  442. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:293
            # XXX: make these guys collapsable
            for g, name in self.groupLabels:
                table = gtk.Table(1, 2)
                self.container.add(table)
    
  443. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:314
            # XXX: Do I need to destroy previously attached children?
    
            for name, value in propValues:
                self.fill_property(name, value)
    
  444. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:344
            # XXX: How to indicate detail level of members?
    
            table = self.subtable[group]
            if not attributes:
    
  445. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:353
            # XXX: Do I need to destroy previously attached children?
    
            row = 1 # 0 is title
    
    
  446. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:393
            # XXX: allocation PyCObject is apparently unusable!
            # (w, h) = allocation.width, allocation.height
    
            w, h = (float(w)/_PIXELS_PER_UNIT, float(h)/_PIXELS_PER_UNIT)
    
  447. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:512
            # XXX: include partial module name in class?
            self.frame.set_label("%s (%s)" % (self.identifier,
                                              class_identifier))
    
    
  448. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:567
                        # XXX
                        pass
                    a = "%s=%s" % (name, default)
                elif signature.is_varlist(arg):
    
  449. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:603
        # XXX: add elements group
    
    class SequenceAttributeWidget(AttributeWidget):
        def getTextForLabel(self):
            if self.explorer.len:
                txt = "list of length %d" % (self.explorer.len,)
            else:
    
  450. File: ./../src/twisted/manhole/ui/spelunk_gnome.py:622
        # XXX: add items group
    
    class MappingAttributeWidget(AttributeWidget):
        def getTextForLabel(self):
    
  451. File: ./../src/twisted/manhole/telnet.py:52
            # TODO -- refactor this, Reality.author.Author, and the manhole shell
            #to use common functionality (perhaps a twisted.python.code module?)
            fn = '$telnet$'
            result = None
    
  452. File: ./../src/twisted/manhole/service.py:312
                # TODO: client support for Deferred.
                if isinstance(val, Deferred):
                    self.lastDeferred += 1
                    self.console([('result', "Waiting for Deferred #%s...\n" % self.lastDeferred)])
    
  453. File: ./../src/twisted/manhole/service.py:392
            # TODO -- refactor this and twisted.reality.author.Author to
            # use common functionality (perhaps the 'code' module?)
            dict = self.__dict__.copy()
            ns = dict['namespace'].copy()
    
  454. File: ./../src/twisted/manhole/explorer.py:33
                # XXX: This potentially returns something with
                # 'identifier' set to a different value.
                return self.data[oid]
            else:
    
  455. File: ./../src/twisted/manhole/explorer.py:129
            # XXX: set the .elements member of all my remoteCaches
            return self.get_elements()
    
    
    
  456. File: ./../src/twisted/manhole/explorer.py:160
            # XXX: set the .keys member of all my remoteCaches
            return self.get_keys()
    
        def view_get_item(self, perspective, key):
    
  457. File: ./../src/twisted/manhole/explorer.py:210
                # TODO: Make screening of private attributes configurable.
                if i[0] == '_':
                    continue
                mIdentifier = string.join([identifier, i], ".")
    
  458. File: ./../src/twisted/manhole/explorer.py:506
        # TODO:
        #
        #  * an exclude mechanism for the watcher's browser, to avoid
        #    sending back large and uninteresting data structures.
    
  459. File: ./../src/twisted/manhole/explorer.py:581
            # XXX: This probably prevents these objects from ever having a
            # zero refcount.  Leak, Leak!
            ## self.watchUninstallers[object] = uninstallers
    
    
  460. File: ./../src/twisted/manhole/explorer.py:604
            # XXX: this conditional probably isn't effective.
            if oldMethod is not self:
                # avoid triggering __setattr__
                self.instance.__dict__[methodIdentifier] = (
    
  461. File: ./../src/twisted/manhole/explorer.py:620
            # XXX: This probably doesn't work if multiple monkies are hanging
            # on a method and they're not removed in order.
            if self.oldMethod[1] is None:
                delattr(self.instance, self.oldMethod[0])
    
  462. File: ./../src/twisted/manhole/explorer.py:652
            # XXX: Hey, waitasec, did someone just hang a new method on me?
            #  Do I need to put a monkey on it?
    
            self._watchEmitChanged()
    
  463. File: ./../src/twisted/protocols/sip.py:583
                # XXX support multi-line headers
                try:
                    name, value = line.split(":", 1)
                except ValueError:
    
  464. File: ./../src/twisted/protocols/sip.py:676
            # XXX we don't do multicast yet
            host = destVia.received or destVia.host
            port = destVia.rport or destVia.port or self.PORT
            destAddr = URL(host=host, port=port)
    
  465. File: ./../src/twisted/protocols/sip.py:838
            # XXX we don't do multicast yet
            host = destVia.received or destVia.host
            port = destVia.rport or destVia.port or self.PORT
            
    
  466. File: ./../src/twisted/protocols/sip.py:857
                # XXX note this check breaks if we have multiple external IPs
                # yay for suck protocols
                log.msg("Dropping incorrectly addressed message")
                return
    
  467. File: ./../src/twisted/protocols/sip.py:1012
            # XXX
            # ACKs are a client's way of indicating they got the last message
            # Responding to them is not a good idea.
            # However, we should keep track of terminal messages and re-transmit
    
  468. File: ./../src/twisted/protocols/sip.py:1085
                # XXX Check expires on appropriate URL, and pass it to registry
                # instead of having registry hardcode it.
                if contact is not None:
                    name, contactURL, params = parseAddress(contact, host=host, port=port)
    
  469. File: ./../src/twisted/protocols/sip.py:1107
            # XXX return error message, and alter tests to deal with
            # this, currently tests assume no message sent on failure
    
        def unregister(self, message, toURL, contact):
    
  470. File: ./../src/twisted/protocols/htb.py:24
    # TODO: Investigate whether we should be using os.times()[-1] instead of
    # time.time.  time.time, it has been pointed out, can go backwards.  Is
    # the same true of os.times?
    from time import time
    
  471. File: ./../src/twisted/protocols/pcp.py:54
                # TODO: Check to see if consumer supports writeSeq.
                self.consumer.write(''.join(self._buffer))
                self._buffer[:] = []
            else:
    
  472. File: ./../src/twisted/protocols/pcp.py:143
                # TODO: You can see here the potential for high and low
                # watermarks, where bufferSize would be the high mark when we
                # ask the upstream producer to pause, and we wouldn't have
                # it resume again until it hit the low mark.  Or if producer
    
  473. File: ./../src/twisted/protocols/ftp.py:105
        RESTART_MARKER_REPLY:               '110 MARK yyyy-mmmm', # TODO: this must be fixed
        SERVICE_READY_IN_N_MINUTES:         '120 service ready in %s minutes',
        DATA_CNX_ALREADY_OPEN_START_XFR:    '125 Data connection already open, starting transfer',
        FILE_STATUS_OK_OPEN_DATA_CNX:       '150 File status okay; about to open data connection.',
    
  474. File: ./../src/twisted/protocols/ftp.py:488
                # TODO: LEFT OFF HERE!
    
                d.addErrback(debugDeferred, 'timeoutFactory firing errback')
                d.errback(defer.TimeoutError())
    
  475. File: ./../src/twisted/protocols/ftp.py:637
            # XXX It burnsss
            # LineReceiver doesn't let you resumeProducing inside
            # lineReceived atm
            from twisted.internet import reactor
    
  476. File: ./../src/twisted/protocols/ftp.py:689
        # TODO: add max auth try before timeout from ip...
    
        def ftp_PASS(self, password):
            """
    
  477. File: ./../src/twisted/protocols/ftp.py:819
            # XXX: why is this check different to ftp_RETR/ftp_STOR?
            if self.dtpInstance is None or not self.dtpInstance.isConnected:
                return defer.fail(BadCmdSequenceError('must send PORT or PASV before RETR'))
    
    
  478. File: ./../src/twisted/protocols/ftp.py:843
            # XXX Maybe this globbing is incomplete, but who cares.
            # Stupid people probably.
            if segments and (
                '*' in segments[-1] or '?' in segments[-1] or
    
  479. File: ./../src/twisted/protocols/ftp.py:860
                # XXX Eh, what to fail with here?
                return defer.fail(FileNotFoundError(path))
    
            def accessGranted(result):
    
  480. File: ./../src/twisted/protocols/ftp.py:887
            # XXX For now, just disable the timeout.  Later we'll want to
            # leave it active and have the DTP connection reset it
            # periodically.
            self.setTimeout(None)
    
  481. File: ./../src/twisted/protocols/ftp.py:945
            # XXX For now, just disable the timeout.  Later we'll want to
            # leave it active and have the DTP connection reset it
            # periodically.
            self.setTimeout(None)
    
  482. File: ./../src/twisted/protocols/ftp.py:2105
                # XXX: d.addErrback(_unwrapFirstError), but add a test.
    
            for cmd in cmds:
                self.queueCommand(cmd)
    
  483. File: ./../src/twisted/protocols/stateful.py:41
                if self.transport.disconnecting: # XXX: argh stupid hack borrowed right from LineReceiver
                    return # dataReceived won't be called again, so who cares about consistent state
                if next:
                    state = next
    
  484. File: ./../src/twisted/protocols/amp.py:795
            # XXX this takes command subclasses and not command objects on purpose.
            # There's really no reason to have all this back-and-forth between
            # command objects and the protocol, and the extra object being created
            # (the Command instance) is pointless.  Command is kind of like
    
  485. File: ./../src/twisted/protocols/amp.py:1406
            # XXX before we get back to user code we are going to start TLS...
            def actuallystart(response):
                proto._startTLS(self.certificate, self.authorities)
                return response
    
  486. File: ./../src/twisted/protocols/amp.py:1671
            # XXX this may be a slight oversimplification, but I believe that if
            # there are pending SSL errors, they _are_ the reason that the
            # connection was lost.  a totally correct implementation of this would
            # set up a simple state machine to track whether any bytes were
    
  487. File: ./../src/twisted/conch/test/test_cftp.py:190
           # XXX test chgrp/own
    
        def testList(self):
            lsRes = self._getCmdResult('ls').split('\n')
    
  488. File: ./../src/twisted/conch/test/test_cftp.py:206
            # XXX test lls in a way that doesn't depend on local semantics
    
        def testHelp(self):
            helpRes = self._getCmdResult('?')
    
  489. File: ./../src/twisted/conch/test/test_filetransfer.py:214
            # XXX test setAttrs
            # Ok, how about this for a start?  It caught a bug :)  -- spiv.
            d = self.client.openFile("testfile1", filetransfer.FXF_READ |
                                     filetransfer.FXF_WRITE, {})
    
  490. File: ./../src/twisted/conch/test/test_filetransfer.py:281
            # XXX not until version 4/5
            # self.failUnlessEqual(filetransfer.FILEXFER_TYPE_DIRECTORY&attrs['type'],
            #                     filetransfer.FILEXFER_TYPE_DIRECTORY)
    
    
  491. File: ./../src/twisted/conch/scripts/cftp.py:296
            # XXX this can be optimized for times w/o progress bar
            return self._cbGetMultipleNext(None, files, local)
    
        def _cbGetMultipleNext(self, res, files, local):
    
  492. File: ./../src/twisted/conch/ssh/transport.py:375
            # TODO: we should also look at the value they send to us and reject
            # insecure values of f (if g==2 and f has a single '1' bit while the
            # rest are '0's, then they must have used a small y also).
    
            #  or do as openssh does and scan f for a single '1' bit instead
    
            minimum = long(math.floor(math.log(self.p) / math.log(2)) + 1)
    
  493. File: ./../src/twisted/conch/ssh/transport.py:389
            assert(y >= minimum) # TODO: test_conch just hangs if this is hit
            # the chance of it being hit are really really low
    
            f = pow(self.g, y, self.p)
    
  494. File: ./../src/twisted/conch/ssh/connection.py:125
            # XXX should this move to dataReceived to put client in charge?
            if dataLength > channel.localWindowLeft or \
               dataLength > channel.localMaxPacket: # more data than we want
                log.callWithLogger(channel, lambda s=self,c=channel: 
    
  495. File: ./../src/twisted/conch/ssh/filetransfer.py:49
                    #XXX not implemented
                    continue
                try:
                    f(data)
    
  496. File: ./../src/twisted/conch/insults/helper.py:91
    # XXX - need to support scroll regions and scroll history
    class TerminalBuffer(protocol.Protocol):
        implements(insults.ITerminalTransport)
    
    
  497. File: ./../src/twisted/conch/insults/insults.py:340
    # XXX TODO - These attributes are really part of the
    # ITerminalTransport interface, I think.
    _KEY_NAMES = ('UP_ARROW', 'DOWN_ARROW', 'RIGHT_ARROW', 'LEFT_ARROW',
                  'HOME', 'INSERT', 'DELETE', 'END', 'PGUP', 'PGDN', 'NUMPAD_MIDDLE',
    
  498. File: ./../src/twisted/conch/insults/insults.py:613
            # XXX Support ANSI-Compatible private modes
            self.write('\x1b[%sh' % (';'.join(map(str, modes)),))
    
        def setPrivateModes(self, modes):
    
  499. File: ./../src/twisted/conch/insults/insults.py:620
            # XXX Support ANSI-Compatible private modes
            self.write('\x1b[%sl' % (';'.join(map(str, modes)),))
    
        def resetPrivateModes(self, modes):
    
  500. File: ./../src/twisted/conch/insults/insults.py:633
            # XXX Rewrite these as dict lookups
            if which == G0:
                which = '('
            elif which == G1:
    
  501. File: ./../src/twisted/conch/insults/insults.py:915
                # XXX - Handle '?' to introduce ANSI-Compatible private modes.
                try:
                    modes = map(int, buf.split(';'))
                except ValueError:
    
  502. File: ./../src/twisted/conch/insults/insults.py:924
                # XXX - Handle '?' to introduce ANSI-Compatible private modes.
                try:
                    modes = map(int, buf.split(';'))
                except ValueError:
    
  503. File: ./../src/twisted/conch/insults/window.py:88
            # XXX TODO - Handle shift+tab
            raise YieldFocus()
    
        def focusReceived(self):
    
  504. File: ./../src/twisted/conch/insults/window.py:634
            # XXX /Lame/
            for y, line in enumerate(self._buf.lines[self._yOffset:self._yOffset + height]):
                terminal.cursorPosition(0, y)
                n = 0
    
  505. File: ./../src/twisted/conch/client/direct.py:72
            if alwaysDisplay: # XXX what should happen here?
                print message
    
        def verifyHostKey(self, pubKey, fingerprint):
    
  506. File: ./../src/twisted/conch/client/unix.py:59
            # XXX reenable this when i can fix it for cygwin
            #elif filestats[-3:] != stats[-3:]:
            #    log.msg("socket doesn't have same create times")
            else:
    
  507. File: ./../src/twisted/conch/telnet.py:844
                # XXX TODO: This should be enabled to parse linemode subnegotiation.
                getattr(self, 'linemode_' + self.linemodeSubcommands[linemodeSubcommand])(bytes[1:])
    
        def linemode_SLC(self, bytes):
    
  508. File: ./../src/twisted/conch/manhole_ssh.py:54
            # XXX TODO
            # chainedProtocol is supposed to be an ITerminalTransport,
            # maybe.  That means perhaps its terminalProtocol attribute is
            # an ITerminalProtocol, it could be.  So calling terminalSize
    
  509. File: ./../src/twisted/conch/recvline.py:154
            # XXX Note: I would prefer to default to starting in insert
            # mode, however this does not seem to actually work!  I do not
            # know why.  This is probably of interest to implementors
            # subclassing RecvLine.
    
  510. File: ./../src/twisted/conch/recvline.py:159
            # XXX XXX Note: But the unit tests all expect the initial mode
            # to be insert right now.  Fuck, there needs to be a way to
            # query the current mode or something.
            # self.setTypeoverMode()
    
  511. File: ./../src/twisted/conch/recvline.py:185
            # XXX - Clear the previous input line, redraw it at the new
            # cursor position
            self.terminal.eraseDisplay()
            self.terminal.cursorHome()
    
  512. File: ./../src/twisted/conch/avatar.py:32
            # XXX should this use method dispatch?
            requestType = requestType.replace('-','_')
            f = getattr(self, "global_%s" % requestType, None)
            if not f:
    
  513. File: ./../src/twisted/conch/manhole.py:106
                # XXX Ick, where is my "hasFired()" interface?
                if hasattr(obj, "result"):
                    self.write(repr(obj))
                elif id(obj) in self._pendingDeferreds:
    
  514. File: ./../src/twisted/pair/tuntap.py:51
                assert components.implements(proto, ip.IIPProtocol) # XXX: fix me
            base.BasePort.__init__(self, reactor)
            self.interface = interface
            self.protocol = proto
    
  515. File: ./../src/twisted/vfs/test/test_ftp.py:4
    # TODO:
    #  * more comprehensive testing of error conditions, e.g. deleting files that
    #    don't exist.
    #  * test more complex paths: such as subdirectories, /foo/../bar/.
    
  516. File: ./../src/twisted/vfs/adapters/ftp.py:14
    # XXX: Import this to make sure the adapter registration has happened.
    from twisted.vfs.adapters import stream
    
    
    
  517. File: ./../src/twisted/vfs/adapters/ftp.py:71
        # XXX - this should probably go in a helper somewhere
        def _attrify(self, node):
            meta = node.getMetadata()
            permissions = meta.get('permissions', None)
    
  518. File: ./../src/twisted/vfs/adapters/ftp.py:93
            # XXX: stubbed out to always succeed.
            return defer.succeed(None)
    
        def openForReading(self, segs):
    
  519. File: ./../src/twisted/vfs/adapters/ftp.py:102
            # XXX: this method is way too ugly
            dirname, basename = segs[:-1], segs[-1]
            node = self.filesystem.fetch(
                self._makePath(dirname)).createFile(basename)
    
  520. File: ./../src/twisted/vfs/adapters/sftp.py:104
            # XXX Once we change readChunk/writeChunk we'll have to wrap
            # child in something that implements those.
    
            pathSegments = self.filesystem.splitPath(filename)
    
  521. File: ./../src/twisted/vfs/adapters/sftp.py:198
                # XXX: setMetadata isn't yet part of the IFileSystemNode interface
                # (but it should be).  So we catch AttributeError, and translate it
                # to NotImplementedError because it's slightly nicer for clients.
                node.setMetadata(attrs)
    
  522. File: ./../src/twisted/vfs/adapters/sftp.py:236
                # XXX: setMetadata isn't yet part of the IFileSystemNode interface
                # (but it should be).  So we catch AttributeError, and translate it
                # to NotImplementedError because it's slightly nicer for clients.
                self.original.setMetadata(attrs)
    
  523. File: ./../src/twisted/vfs/adapters/sftp.py:269
            # XXX - this may be broken
            log.msg('avatar %s logging out (%i)' % (self.username, len(self.listeners)))
    
    
    
  524. File: ./../src/twisted/vfs/backends/osfs.py:60
            # XXX spiv 2005-12-15
            # assumes newParent is also an OSDirectory.  Probably should politely
            # decline (rather than break with an undefined error) if it's not.
            newPath = os.path.join(newParent.realPath, pathutils.basename(newName))
    
  525. File: ./../src/twisted/vfs/ivfs.py:39
        # XXX: There should be a setMetadata, probably taking a map of the same form
        # returned by getMetadata (although obviously keys like 'nlink' aren't
        # settable.  Something like:
        # def setMetadata(metadata):
    
  526. File: ./../src/twisted/words/test/test_service.py:473
            # XXX Sigh.  irc.parsemsg() is not as correct as one might hope.
            self.assertEquals(response[3][2], ['useruser', '#somechannel', 'This is a test topic.'])
            self.assertEquals(response[4][1], '333')
            self.assertEquals(response[4][2], ['useruser', '#somechannel', 'some_fellow', '77777777'])
    
  527. File: ./../src/twisted/words/test/test_xpath.py:80
    # XXX: Revist this, given new grammar
    #        xp = XPathQuery("/foo/bar[2]")
    #        self.assertEquals(xp.matches(self.e), 1)
    #        self.assertEquals(xp.queryForNodes(self.e), [self.bar1])
    
  528. File: ./../src/twisted/words/protocols/jabber/client.py:197
        # TODO: move registration into an Initializer?
    
        def registerAccount(self, username = None, password = None):
            if username:
    
  529. File: ./../src/twisted/words/protocols/jabber/error.py:281
            # TODO: raise exception instead?
            return StanzaError(None)
    
        exception = StanzaError(condition, type, text, textLang, appCondition)
    
  530. File: ./../src/twisted/words/protocols/jabber/sasl_mechanisms.py:168
                # TODO - add error checking
                raise
    
            cnonce = self._gen_nonce()
            qop = 'auth'
    
            a1 = "%s:%s:%s" % (H("%s:%s:%s" % (username, realm, password)),
                               nonce,
                               cnonce)
    
  531. File: ./../src/twisted/words/protocols/msn.py:1414
            # XXX: Add a default callback which updates
            # factory.contacts.version and the relevant phone
            # number
            id, d = self._createIDMapping()
    
  532. File: ./../src/twisted/words/protocols/msn.py:1673
    # XXX: A lot of the state currently kept in
    # instances of SwitchboardClient is likely to
    # be moved into a factory at some stage in the
    # future
    
  533. File: ./../src/twisted/words/protocols/irc.py:329
            # XXX If unicode is given, these limits are not quite correct
            prefixLength = len(channel) + len(user) + 10
            namesLength = 512 - prefixLength
    
    
  534. File: ./../src/twisted/words/protocols/irc.py:1235
                # XXX: prefixedMethodNames gets methods from my *class*,
                # but it's entirely possible that this *instance* has more
                # methods.
                names = reflect.prefixedMethodNames(self.__class__,
    
  535. File: ./../src/twisted/words/protocols/irc.py:1313
            # XXX Should we bother passing this data?
            self.dccDoSend(user, address, port, filename, size, data)
    
        def dcc_ACCEPT(self, user, channel, data):
    
  536. File: ./../src/twisted/words/protocols/irc.py:1575
            # XXX: Do we need to check to see if len(data) != fmtsize?
    
            bytesShesGot = struct.unpack("!I", data)
            if bytesShesGot < self.bytesSent:
    
  537. File: ./../src/twisted/words/protocols/irc.py:1580
                # XXX? Add some checks to see if we've stalled out?
                return
            elif bytesShesGot > self.bytesSent:
                # self.transport.log("DCC SEND %s: She says she has %d bytes "
    
  538. File: ./../src/twisted/words/protocols/irc.py:1865
            # XXX: update a progress indicator here?
    
        def connectionLost(self, reason):
            """When the connection is lost, I close the file.
    
  539. File: ./../src/twisted/words/protocols/toc.py:276
            #if self._buf[:3]=="GET": self.modeWeb() # TODO: get this working
            if len(self._buf)<10: return "Flapon" # not enough bytes
            flapon,self._buf=self._buf[:10],self._buf[10:]
            if flapon!="FLAPON\r\n\r\n":
    
  540. File: ./../src/twisted/words/protocols/toc.py:581
            # XXX may not work
            nick=unquote(data)
            if normalize(nick)==self.username:
                self.saved.nick=nick
    
  541. File: ./../src/twisted/words/protocols/toc.py:1086
            # XXX add this back in
            #reactor.clientTCP(pip,port,GetFileTransfer(self,cookie,os.path.expanduser("~")))
            #self.rvous_accept(user,cookie,GET_FILE_UID)
    
    
  542. File: ./../src/twisted/words/protocols/toc.py:1458
                self.hdr[19]=DUMMY_CHECKSUM # XXX really calculate this
                self.hdr[18]=self.hdr[18]+1
                self.hdr[21]="\000"
                self.transport.write(apply(struct.pack,[self.header_fmt]+self.hdr))
    
  543. File: ./../src/twisted/words/protocols/oscar.py:83
        text=string.replace(text,"
    ","\n") # XXX make this a regexp text=string.replace(text,"
    ","\n") text=re.sub('<.*?>','',text) text=string.replace(text,'>','>')
  544. File: ./../src/twisted/words/protocols/oscar.py:333
            #d.addErrback(self._ebDeferredError,fam,sub,data) # XXX for testing
    
            self.requestCallbacks[reqid] = d
            self.sendFLAP(SNAC(fam,sub,reqid,data))
    
  545. File: ./../src/twisted/words/protocols/oscar.py:589
    # XXX what is this?
                self.receiveMessage(user, multiparts, flags)
            elif channel == 2: # rondevouz
                status = struct.unpack('!H',tlvs[5][:2])[0]
    
  546. File: ./../src/twisted/words/im/gtkaccount.py:25
            self.chatui._accountmanager = self # TODO: clean this up... it's used in gtkchat
            print self.xml._o
            autoConnectMethods(self, self.chatui.theContactsList)
            self.widget = self.xml.get_widget("AccountManWidget")
    
  547. File: ./../src/twisted/words/im/ircsupport.py:103
            # XXX: Why do I duplicate code in IRCClient.register?
            try:
                print 'connection made on irc service!?', self
                if self.account.password:
    
  548. File: ./../src/twisted/words/im/tocsupport.py:23
        text=string.replace(text,"
    ","\n") # XXX make this a regexp text=string.replace(text,"
    ","\n") text=re.sub('<.*?>','',text) text=string.replace(text,'>','>')
  549. File: ./../src/twisted/words/im/gtkchat.py:192
            # TODO: we shouldn't be getting group conversations randomly without
            # names, but irc autojoin appears broken.
            self.xml.get_widget("NickLabel").set_text(
                getattr(self.group.account.client,"name","(no name)"))
    
  550. File: ./../src/twisted/words/service.py:64
                    user, err = result.value # XXX
                    self.remove(user, err.getErrorMessage())
    
    
    
  551. File: ./../src/twisted/words/service.py:127
            # XXX Deferred?
            return iter(self.users.values())
    
    
    
  552. File: ./../src/twisted/words/service.py:327
                # XXX Send an error response here
                self.transport.loseConnection()
            elif target.lower() != "nickserv":
                self.privmsg(
    
  553. File: ./../src/twisted/words/service.py:380
                "creationDate": ctime(), # XXX
                }
            for code, text in self._welcomeMessages:
                self.sendMessage(code, text % info)
    
  554. File: ./../src/twisted/words/service.py:1026
                # XXX Deferred support here
                getattr(facet, 'logout', lambda: None)()
                avatar.realm = avatar.mind = None
            return logout
    
  555. File: ./../src/twisted/words/tap.py:61
        # XXX Attribute lookup on config is kind of bad - hrm.
        for plgName in config.interfacePlugins:
            port = config.get(plgName + '-port')
            if port is not None:
    
  556. File: ./../src/twisted/words/xish/xpathparser.g:24
    # TODO: it should be possible to embed yappsrt into the generated
    # grammar to make a standalone module.
    
    import sys, re
    
  557. File: ./../src/twisted/words/xish/xpathparser.g:99
            # TODO: make this work at any token/char position
            return self.first_line_number + self.get_input_scanned().count('\n')
    
        def get_column_number(self):
    
  558. File: ./../src/twisted/words/xish/xpathparser.g:249
        # TODO: separate out the logic for determining the line/character
        # location from the logic for determining how to display an
        # 80-column line to stderr.
        
    
  559. File: ./../src/twisted/words/xish/xpathparser.g:295
            # TODO: add line number
            print >>sys.stderr, 'while parsing %s%s:' % (context.rule, tuple(context.args))
            print_line_with_pointer(input, context.scanner.get_prev_char_pos(context.tokenpos))
            context = context.parent
    
  560. File: ./../src/twisted/words/xish/xpathparser.py:23
    # TODO: it should be possible to embed yappsrt into the generated
    # grammar to make a standalone module.
    
    import sys, re
    
  561. File: ./../src/twisted/words/xish/xpathparser.py:97
            # TODO: make this work at any token/char position
            return self.first_line_number + self.get_input_scanned().count('\n')
    
        def get_column_number(self):
    
  562. File: ./../src/twisted/words/xish/xpathparser.py:248
        # TODO: separate out the logic for determining the line/character
        # location from the logic for determining how to display an
        # 80-column line to stderr.
        
    
  563. File: ./../src/twisted/words/xish/xpathparser.py:294
            # TODO: add line number
            print >>sys.stderr, 'while parsing %s%s:' % (context.rule, tuple(context.args))
            print_line_with_pointer(input, context.scanner.get_prev_char_pos(context.tokenpos))
            context = context.parent
    
  564. File: ./../src/twisted/words/xish/domish.py:668
                    # XXX: Write more legible explanation
                    raise ParserError, "Element closed after end of document."
    
                # Fix up name
    
  565. File: ./../src/twisted/words/xish/domish.py:691
                        # XXX: Write more legible explanation
                        raise ParserError, "Malformed element close"
    
                    # Pop prefix and default NS stack
    
  566. File: ./../src/twisted/web2/test/test_stream.py:595
    # TODO: 
    # CompoundStreamTest
    # more tests for ProducerStreamTest
    # StreamProducerTest
    
  567. File: ./../src/twisted/web2/filter/gzip.py:6
    # TODO: ungzip (can any browsers actually generate gzipped
    # upload data?) But it's necessary for client anyways.
    
    def gzipStream(input, compressLevel=6):
    
  568. File: ./../src/twisted/web2/channel/http.py:117
                    # TODO: support Trailers (maybe! but maybe not!)
                    
                    # After getting the final "0" chunk we're here, and we *EAT MERCILESSLY*
                    # any trailer headers sent, and wait for the blank line to terminate the
    
  569. File: ./../src/twisted/web2/channel/http.py:268
                # TODO: support gzip/etc encodings.
                # FOR NOW: report an error if the client uses any encodings.
                # They shouldn't, because we didn't send a TE: header saying it's okay.
                if transferEncoding:
    
  570. File: ./../src/twisted/web2/stream.py:197
                # XXX: Yay using non-existent sendfile support!
                # FIXME: if we return a SendfileBuffer, and then sendfile
                #        fails, then what? Or, what if file is too short?
                readSize = min(length, SENDFILE_LIMIT)
    
  571. File: ./../src/twisted/web2/stream.py:462
        # XXX deal better with addresses
        p = factory.buildProtocol(None)
        out = ProducerStream()
        p.makeConnection(out)
        readStream(inputStream, lambda _: p.dataReceived(_)).addCallbacks(
            lambda _: p.connectionLost(ti_error.ConnectionDone()), lambda _: p.connectionLost(_))
    
  572. File: ./../src/twisted/web2/stream.py:760
                # XXX: sucks that we have to do this. make transport.write(buffer) work!
                data = str(buffer(data))
            self.consumer.write(data)
            
    
  573. File: ./../src/twisted/web2/stream.py:854
            # XXX what happens if spawn fails?
            reactor.spawnProcess(self._protocol, self._program, self._args, env=self._env)
            del self._env
            return self._protocol.resultDeferred.addErrback(lambda _: _.trap(ti_error.ProcessDone))
    
  574. File: ./../src/twisted/web2/twscgi.py:4
    # TODO:
    #   * Handle scgi server death, half way through a resonse.
    
    
    
  575. File: ./../src/twisted/web2/http_headers.py:1441
        'Referer':(last,str), # TODO: URI object?
        'TE':(tokenize, listParser(parseAcceptQvalue), dict),
        'User-Agent':(last,str),
    }
    
  576. File: ./../src/twisted/web2/http_headers.py:1473
        'Location':(last,), # TODO: URI object?
    #    'Proxy-Authenticate'
        'Retry-After':(last, parseRetryAfter),
        'Server':(last,),
    
  577. File: ./../src/twisted/web2/http_headers.py:1503
        'Content-Location':(last,), # TODO: URI object?
        'Content-MD5':(last, parseContentMD5),
        'Content-Range':(last, parseContentRange),
        'Content-Type':(lambda str:tokenize(str, foldCase=False), parseContentType),
    
  578. File: ./../src/twisted/web2/http_headers.py:1527
        'Destination' : (last,), # TODO: URI object?
       #'If'          : (),
       #'Lock-Token'  : (),
        'Overwrite'   : (last, parseOverWrite),
    
  579. File: ./../src/twisted/web2/log.py:158
                    # XXX: Where to get user from?
                    "-",
                    self.logDateString(
                        response.headers.getHeader('date', 0)),
    
  580. File: ./../src/twisted/persisted/aot.py:82
            #XXX make state be foo=bar instead of a dict.
            if self.stateIsDict:
                stateDict = self.state
            elif isinstance(self.state, Ref) and isinstance(self.state.obj, types.DictType):
    
  581. File: ./../src/twisted/persisted/aot.py:307
            #XXX this is unused????
            """Utility method for unjellying into instances of attributes.
            
            Use this rather than unjellyAO unless you like surprising bugs!
    
  582. File: ./../src/twisted/persisted/aot.py:478
                # TODO: make methods 'prefer' not to jelly the object internally,
                # so that the object will show up where it's referenced first NOT
                # by a method.
                retval = InstanceMethod(obj.im_func.__name__, reflect.qual(obj.im_class),
    
  583. File: ./../src/twisted/persisted/marmalade.py:83
                # XXX: DOMJellyable.unjellyNode does not exist
                state = self.unjellyNode(getValueElement(node))
                if hasattr(self.__class__, "__setstate__"):
                    self.__setstate__(state)
    
  584. File: ./../src/twisted/persisted/marmalade.py:129
                # XXX FIXME this is obviously insecure
                # if you doubt:
                # >>> unjellyFromXML('''''')
                # "hi"
    
  585. File: ./../src/twisted/persisted/marmalade.py:290
                # TODO: make methods 'prefer' not to jelly the object internally,
                # so that the object will show up where it's referenced first NOT
                # by a method.
                node.appendChild(self.jellyToNode(obj.im_self))
    
  586. File: ./../src/twisted/persisted/marmalade.py:309
                # TODO: beat pickle at its own game, and do BuiltinFunctionType
                # separately, looking for __self__ attribute and unpickling methods
                # of C objects when possible.
                node = self.document.createElement("function")
    
  587. File: ./../src/twisted/names/common.py:161
            # XXX - respect timeout
            return self.lookupAllRecords(name, timeout
                ).addCallback(self._cbRecords, name, effort
                )
    
  588. File: ./../src/twisted/names/authority.py:191
            self.origin = os.path.basename(filename) + '.' # XXX - this might suck
            lines = open(filename).readlines()
            lines = self.stripComments(lines)
            lines = self.collapseContinuations(lines)
    
  589. File: ./../src/twisted/names/authority.py:240
                elif line[0] == '$INCLUDE': # XXX - oh, fuck me
                    raise NotImplementedError('$INCLUDE directive not implemented')
                elif line[0] == '$GENERATE':
                    raise NotImplementedError('$GENERATE directive not implemented')
    
  590. File: ./../src/twisted/names/client.py:796
        # XXX: timeout here is not a list of ints, it is a single int.
        return getResolver().lookupZone(name, timeout)
    
    def lookupAllRecords(name, timeout=None):
    
  591. File: ./../src/twisted/names/hosts.py:34
        #TODO: IPv6 support
    
        persistenceVersion = 1
    
    
  592. File: ./../src/twisted/names/dns.py:1125
                # XXX we shouldn't need this hack of catching exceptioon on callback()
                try:
                    d.callback(m)
                except:
    
  593. File: ./../src/twisted/names/dns.py:1157
                # XXX transport might not get created automatically, use callLater?
                self.startListening()
    
            if id is None:
    
  594. File: ./../src/twisted/names/secondary.py:35
                # XXX Add errbacks, respect proper timeouts
                reactor.callLater(i, c.start, 60 * 60)
                i += 1
    
    
  595. File: ./../src/twisted/application/internet.py:77
            # TODO: if startup failed, should shutdown skip stopListening?
            # _port won't exist
            if self._port is not None:
                d = self._port.stopListening()
    
  596. File: ./../src/twisted/application/app.py:40
            # XXX - omfg python sucks
            tmp, sys.stdout = sys.stdout, open(config['profile'], 'a')
            p.print_stats()
            sys.stdout, tmp = tmp, sys.stdout
    
  597. File: ./../src/twisted/application/reactors.py:33
        # TODO - A method which provides a best-guess as to whether this reactor
        # can actually be used in the execution environment.
    
    
    
  598. File: ./../src/twisted/flow/protocol.py:108
                # TODO: support more than one callback via Concurrent
            def _execute(self, dummy = None):
                cmd = self._controller
                self.write = self.transport.write
    
  599. File: ./../src/twisted/flow/stage.py:205
        # TODO: Potentially rename this 'Consumer' and make it
        #       comply with protocols.IConsumer
        class Instruction(CallLater):
            def __init__(self):
                self.flow = lambda: True
    
  600. File: ./../src/twisted/news/test/test_nntp.py:117
            # XXX This test is woefully incomplete.  It tests the single
            # most common code path and nothing else.  Expand it and the
            # test fairy will leave you a surprise.
    
    
  601. File: ./../src/twisted/news/news.py:56
    # XXX - Maybe this inheritence doesn't make so much sense?
    class UsenetServerFactory(NNTPFactory):
        """A factory for NNTP Usenet server protocols."""
    
    
  602. File: ./../src/twisted/news/nntp.py:566
                # XXX - this could use a real implementation, eh?
                self.sendLine('215 Descriptions in form "group description"')
                self.sendLine('.')
            elif subcmd == 'overview.fmt':
    
  603. File: ./../src/twisted/news/database.py:32
    ERR_NOGROUP, ERR_NOARTICLE = range(2, 4)  # XXX - put NNTP values here (I guess?)
    
    OVERVIEW_FMT = [
        'Subject', 'From', 'Date', 'Message-ID', 'References',
    
  604. File: ./../src/twisted/news/database.py:39
    def hexdigest(md5): #XXX: argh. 1.5.2 doesn't have this.
        return ''.join(map(lambda x: hex(ord(x))[2:], md5.digest()))
    
    class Article:
    
  605. File: ./../src/twisted/news/database.py:984
    #### XXX - make these static methods some day
    ####
    def makeGroupSQL(groups):
        res = ''
    
  606. File: ./../src/twisted/news/tap.py:17
            # XXX - Hrm.
            ["groups",     "g", "groups.list",   "File containing group list"],
            ["servers",    "s", "servers.list",  "File containing server list"]
        ]
    
  607. File: ./../src/twisted/news/tap.py:23
            # XXX - Hmmm.
            self['groups'] = [g.strip() for g in open(self['groups']).readlines() if not g.startswith('#')]
            self['servers'] = [s.strip() for s in open(self['servers']).readlines() if not s.startswith('#')]
    
    
  608. File: ./../src/twisted/news/tap.py:49
            # XXX - Hrm.
            ["groups",     "g", "groups.list",   "File containing group list"],
            ["servers",    "s", "servers.list",  "File containing server list"],
            ["moderators", "m", "moderators.list",
    
  609. File: ./../src/twisted/news/tap.py:59
            # XXX - Hmmm.
            filename = self['file']
            self['groups'] = [g.strip() for g in open(self['groups']).readlines()
                              if not g.startswith('#')]
    
  610. File: ./../src/twisted/web/test/test_web.py:136
        # XXX: test web.distrib.
    
        def setUp(self):
            self.resrc = SimpleResource()
    
  611. File: ./../src/twisted/web/test/test_woven.py:323
    # xxx sanity check for now; just make sure it doesn't raise anything
    
    class ModelPathTest(WovenTC):
        modelFactory = lambda self: ['hello', ['hi', 'there'], 
    
  612. File: ./../src/twisted/web/test/test_woven.py:394
        # TODO: this should be an interface in twisted.protocols.http... lots of
        # things want to fake out HTTP
        def __init__(self):
            self.transport = self
    
  613. File: ./../src/twisted/web/test/test_xml.py:233
            ## XXX THIS TEST IS TURNED OFF UNTIL SOMEONE WHO CARES ABOUT FIXING IT DOES
            #self.failIf(d3.isEqualToDocument(d2), "%r == %r" % (d3.toxml(), d2.toxml()))
            self.assert_(d3.isEqualToDocument(d4), "%r != %r" % (d3.toxml(), d4.toxml()))
            self.assert_(d4.isEqualToDocument(d5), "%r != %r" % (d4.toxml(), d5.toxml()))
    
  614. File: ./../src/twisted/web/woven/form.py:353
                # TODO:
                # * some arg types should only have a single node (text, string, etc)
                # * some should have multiple nodes (choice, checkgroup)
                # * some have a bunch of ancillary nodes that are possible values (menu, radiogroup)
    
  615. File: ./../src/twisted/web/woven/widgets.py:907
            # TODO: we ought to support Deferreds here for both text and href!
            if isinstance(data, StringType):
                node.tagName = self.tagName
                node.attributes["href"] = data
    
  616. File: ./../src/twisted/web/woven/view.py:586
                # TODO: Need to handle deferreds here?
                pass
    
        def sendPage(self, request):
    
  617. File: ./../src/twisted/web/distrib.py:95
            #XXX: Argh. FIXME.
            failure = str(failure)
            self.request.write(
                error.ErrorPage(http.INTERNAL_SERVER_ERROR,
    
  618. File: ./../src/twisted/web/guard.py:76
            # TODO: fix this...
            resKey = string.join(['AUTH',self.reqauth.service.serviceName], '_')
            sess = request.getSession()
            setattr(sess, resKey, perspective)
    
  619. File: ./../src/twisted/web/guard.py:170
    # TODO hiding forms behind a ResourceGuard sucks, because if
    # ResourceGuard needs to authenticate the user, it will 1) complain
    # about the form submitted, 2) throw the data away. This happens if
    # you use "foo?a=b" -style URLs and the user hasn't authenticated yet,
    
  620. File: ./../src/twisted/web/widgets.py:673
            ## XXX: How would a deferred go about producing the result in multiple
            ## stages?? --glyph
            if result[0] is NOT_DONE_YET:
                done = 0
    
  621. File: ./../src/twisted/web/widgets.py:746
    ## XXX: is this needed?
    class WidgetResource(resource.Resource):
        def __init__(self, widget):
            self.widget = widget
    
  622. File: ./../src/twisted/web/widgets.py:853
            # TODO who says it's not https?
            request.setHeader("location","http%s://%s%s/" % (
                request.isSecure() and 's' or '',
                request.getHeader("host"),
    
  623. File: ./../src/twisted/web/widgets.py:897
            #XXX: delete this after a while.
            if hasattr(self, "page"):
                log.msg("Gadget.page is deprecated, use Gadget.pageFactory instead")
                return apply(self.page, args, kwargs)
    
  624. File: ./../src/twisted/web/server.py:107
            # XXX refactor this attribute out; it's from protocol
            # del x['server']
            del x['channel']
            del x['content']
    
  625. File: ./../src/twisted/web/twcgi.py:74
                   "SCRIPT_NAME":       script_name, # XXX
                   "SCRIPT_FILENAME":   self.filename,
                   "REQUEST_URI":       request.uri,
            }
    
  626. File: ./../src/twisted/web/util.py:50
            # XXX is this enough?
            if ((url.find('://') == -1)
                and (not url.startswith('..'))
                and (not url.startswith('/'))):
    
  627. File: ./../src/twisted/web/sux.py:317
                # XXX FIXME really handle !DOCTYPE at some point
                if self.tagName == '!DOCTYPE':
                    return 'doctype'
                if self.tagName[0] in '!?':
    
  628. File: ./../src/twisted/web/sux.py:479
                self._parseError("Mal-formed")#XXX When does this happen??
            if byte != '>':
                if self.beExtremelyLenient:
                    return
    
  629. File: ./../src/twisted/web/static.py:381
            # xxx use a file-extension-to-save-function dictionary instead
            if type(child) == type(""):
                fl = open(os.path.join(self.path, name), 'wb')
                fl.write(child)
    
  630. File: ./../src/twisted/test/test_threadpool.py:61
            # XXX Sigh - race condition: start should return a Deferred
            # which fires when all the workers it started have fully
            # started up.
            time.sleep(0.1)
    
  631. File: ./../src/twisted/test/test_threadpool.py:75
            # XXX As above
            time.sleep(0.1)
    
            self.assertEquals(len(tp2.threads), 7)
    
  632. File: ./../src/twisted/test/test_iutils.py:102
                (out, err, sig) = err.value # XXX Sigh wtf
                self.assertEquals(out, "stdout bytes" + os.linesep)
                self.assertEquals(err, "stderr bytes" + os.linesep)
                self.assertEquals(sig, signal.SIGKILL)
    
  633. File: ./../src/twisted/test/test_htb.py:71
    # TODO: Test the Transport stuff?
    
    from test_pcp import DummyConsumer
    
    
  634. File: ./../src/twisted/test/test_banana.py:166
                   # TODO: currently the C implementation's a bit buggy...
                   sys.maxint * 3l, sys.maxint * 2l, sys.maxint * -2l]
            self.enc.sendEncoded(foo)
            for byte in self.io.getvalue():
    
  635. File: ./../src/twisted/test/test_log.py:72
            # XXX - use private _flushErrors so we don't also catch
            # the deprecation warnings
            excs = [f.type for f in log._flushErrors(ZeroDivisionError)]
            self.assertEquals([ZeroDivisionError], excs)
    
  636. File: ./../src/twisted/test/test_internet.py:557
        # XXX Test that reactor.stop() invokes shutdown triggers
    
    
    
    
  637. File: ./../src/twisted/test/test_udp.py:230
            # XXX - assume no one listening on port 80 UDP
            client = Client()
            clientStarted = client.startedDeferred = Deferred()
            server = Server()
    
  638. File: ./../src/twisted/test/iosim.py:107
            # XXX: According to ITransport, this should return an IAddress!
            return 'file', 'file'
    
        def getHost(self):
            return 'file'
    
        def resumeProducing(self):
    
  639. File: ./../src/twisted/test/iosim.py:231
                # XXX slightly buggy in the face of incremental output
                if cData:
                    print 'C: '+repr(cData)
                if sData:
    
  640. File: ./../src/twisted/test/test_process.py:145
        # XXX: Trial now does this (see
        #      twisted.trial.runner.MethodInfoBase._setUpSigchldHandler)... perhaps
        #      this class should be removed?  Or trial shouldn't bother, and this
        #      class used where it matters?
    
  641. File: ./../src/twisted/test/test_process.py:409
        testEcho.timeout = 60 # XXX This should not be.  There is already a
                              # global timeout value.  Why do you think this
                              # test can complete more quickly?
    
    
  642. File: ./../src/twisted/test/test_amp.py:137
        # XXX TODO: actually make this refuse to send over an insecure connection
        response = [('pinged', amp.Boolean())]
    
    class TestSwitchProto(amp.ProtocolSwitchCommand):
    
  643. File: ./../src/twisted/test/test_amp.py:889
                        # XXX - should optional arguments just not be passed?
                        # passing None seems a little odd, looking at the way it
                        # turns out here... -glyph
                        From=('file', 'file'),
    
  644. File: ./../src/twisted/test/test_sslverify.py:318
                # XXX Twisted doesn't report SSL errors as SSL errors, but in the
                # future it will.
    
                # cResult.trap(SSL.Error)
    
  645. File: ./../src/twisted/test/test_threads.py:20
            # XXX Uh, how about some asserts?
            reactor.suggestThreadPoolSize(34)
            reactor.suggestThreadPoolSize(4)
    
    
  646. File: ./../src/twisted/test/test_threadable.py:40
            # XXX This is a trial hack.  We need to make sure the reactor
            # actually *starts* for isInIOThread() to have a meaningful result.
            # Returning a Deferred here should force that to happen, if it has
            # not happened already.  In the future, this should not be
    
  647. File: ./../src/twisted/test/test_pcp.py:364
    # TODO:
    #  test that web request finishing bug (when we weren't proxying
    #    unregisterProducer but were proxying finish, web file transfers
    #    would hang on the last block.)
    
  648. File: ./../src/twisted/test/test_socks.py:139
    ##         # TODO ensure the listen port is closed
    ##         listen = self.sock.driver_listen
    ##         if listen is not None:
    ##             self.assert_(incoming.transport.stringTCPTransport_closing,
    
  649. File: ./../src/twisted/test/test_tcp.py:257
            # XXX we assume no one is listening on TCP port 69
            reactor.connectTCP("127.0.0.1", 69, clientF, timeout=5)
            def check(ignored):
                clientF.reason.trap(error.ConnectionRefusedError)
    
  650. File: ./../src/twisted/test/test_tcp.py:1217
            # XXX we don't test server side yet since we don't do it yet
            d = protocol.ClientCreator(reactor, MyProtocol).connectTCP(
                p.getHost().host, p.getHost().port)
            d.addCallback(self._gotClient)
    
  651. File: ./../src/twisted/test/test_tcp.py:1292
                # XXX client won't be closed?! why isn't server sending RST?
                # or maybe it is and we have a bug here.
                self.client.transport.loseConnection()
                log.flushErrors(RuntimeError)
    
  652. File: ./../src/twisted/test/test_error.py:102
            ("Uh.", #TODO nice docstring, you've got there.
             error.ConnectionFdescWentAway),
    
            ("Tried to cancel an already-called event.",
    
  653. File: ./../src/twisted/mail/test/test_imap.py:78
                # XXX - Piece of *crap* 2.1
                self.assertEquals(input, imap4.decoder(output)[0])
    
        def testPrintableSingletons(self):
    
  654. File: ./../src/twisted/mail/test/test_imap.py:423
            # XXX This code used to work, but changes occurred within the
            # imap4.py module which made it no longer necessary for *all* of it
            # to work.  In particular, only the part that makes
            # 'BODY.PEEK[HEADER.FIELDS.NOT (Subject Bcc Cc)]' come out correctly
    
  655. File: ./../src/twisted/mail/imap4.py:781
            # XXX Should really use list of search terms and parse into
            # a proper tree
    
            return (query, '')
    
  656. File: ./../src/twisted/mail/imap4.py:1584
            # XXX - This must search headers too
            body = query.pop(0).lower()
            return text.strFile(body, msg.getBodyFile(), False)
    
    
  657. File: ./../src/twisted/mail/imap4.py:1864
            # XXX - This should handle failures with a rollback or something
            addedDeferreds = []
            addedIDs = []
            failures = []
    
  658. File: ./../src/twisted/mail/imap4.py:1876
                # XXX - The following should be an implementation of IMessageCopier.copy
                # on an IMailbox->IMessageCopier adapter.
    
                flags = msg.getFlags()
    
  659. File: ./../src/twisted/mail/imap4.py:2176
                    # XXX - This is rude.
                    self.transport.loseConnection()
                    raise IllegalServerResponse(tag + ' ' + rest)
    
    
  660. File: ./../src/twisted/mail/imap4.py:2205
                    # XXX - This is rude.
                    self.transport.loseConnection()
                    raise IllegalServerResponse(tag + ' ' + rest)
                else:
    
  661. File: ./../src/twisted/mail/imap4.py:2228
            # XXX - This is terrible.
            #       invocations of IMailboxListener methods, where possible.
            flags = {}
            recent = exists = None
    
  662. File: ./../src/twisted/mail/imap4.py:2556
                        # XXX UGGG parsing hack :(
                        r = parseNestedParens('(' + parts[1] + ')')[0]
                        return [e or [] for e in r]
            log.err("No NAMESPACE response to NAMESPACE command")
    
  663. File: ./../src/twisted/mail/imap4.py:4428
        # XXX - Super expensive, CACHE THIS VALUE FOR LATER RE-USE
        lines = 0
        for _ in msg.getBodyFile():
            lines += 1
    
  664. File: ./../src/twisted/mail/imap4.py:4441
        # XXX - This does not properly handle multipart messages
        # BODYSTRUCTURE is obscenely complex and criminally under-documented.
    
        attrs = {}
    
  665. File: ./../src/twisted/mail/imap4.py:4495
            # XXX - I dunno if this is really right
            if disp:
                disp = disp.split('; ')
                if len(disp) == 1:
    
  666. File: ./../src/twisted/mail/imap4.py:4518
                # XXX - I dunno if this is really right
                headers = msg.getHeaders(False, 'content-disposition', 'content-language')
                disp = headers.get('content-disposition')
                if disp:
    
  667. File: ./../src/twisted/mail/imap4.py:5327
        # XXX - This may require localization :(
        months = [
            'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct',
            'nov', 'dec', 'january', 'february', 'march', 'april', 'may', 'june',
    
  668. File: ./../src/twisted/mail/relay.py:61
        # XXX - This is -totally- bogus
        # It opens about a -hundred- -billion- files
        # and -leaves- them open!
    
    
  669. File: ./../src/twisted/mail/pop3client.py:274
            # XXX - We need to be smarter about this
            if self._waiting is not None:
                waiting, self._waiting = self._waiting, None
                waiting.errback(LineTooLong())
    
  670. File: ./../src/twisted/mail/pop3.py:609
                        # XXX TODO See above comment regarding IndexError.
                        warnings.warn(
                            "twisted.mail.pop3.IMailbox.getUidl may not "
                            "raise IndexError for out-of-bounds message numbers: "
    
  671. File: ./../src/twisted/mail/pop3.py:654
                        # XXX TODO See above comment regarding IndexError.
                        warnings.warn(
                            "twisted.mail.pop3.IMailbox.listMessages may not "
                            "raise IndexError for out-of-bounds message numbers: "
    
  672. File: ./../src/twisted/mail/smtp.py:1340
                #XXX: May want to come up with a more efficient way to do this
                for s in schemes:
                    tmpSchemes[s.upper()] = 1
    
    
  673. File: ./../src/twisted/mail/protocols.py:52
            # XXX - Yick.  This needs cleaning up.
            if self.user and self.service.queue:
                d = self.service.domains.get(user.dest.domain, None)
                if d is None:
    
  674. File: ./../src/twisted/internet/iocpreactor/udp.py:126
            # TODO: use Failures or something
            if ret == ERROR_PORT_UNREACHABLE:
                self.protocol.connectionRefused()
            if self.reading:
    
  675. File: ./../src/twisted/internet/iocpreactor/abstract.py:44
            self.write_op = WriteFileOp(self) # XXX: these two should be specified like before, with a class field
    
        def addBufferCallback(self, handler, event):
            self.bufferEvents[event].add(handler)
    
  676. File: ./../src/twisted/internet/iocpreactor/abstract.py:117
            # XXX: perhaps the following needs to be around to avoid resetting the connection ungracefully
            try:
                self.socket.shutdown(2)
            except socket_error:
    
  677. File: ./../src/twisted/internet/unix.py:174
                skt = self.createInternetSocket() # XXX: haha misnamed method
                if self.port:
                    skt.bind(self.port)
            except socket.error, le:
    
  678. File: ./../src/twisted/internet/unix.py:201
                    # TODO: add TCP-like buffering
                    pass
                else:
                    raise
    
  679. File: ./../src/twisted/internet/unix.py:288
                    # TODO: add TCP-like buffering
                    pass
                else:
                    raise
    
  680. File: ./../src/twisted/internet/gtk2reactor.py:67
        # XXX: gtk.main_quit() (which is used for crash()) raises an exception if
        # gtk.main_level() == 0; however, all the tests freeze if we use this
        # function to stop the reactor.  what gives?  (I believe this may have been
        # a stupid mistake where I forgot to import gtk here... I will remove this
    
  681. File: ./../src/twisted/internet/error.py:198
        """Uh""" #TODO
    
    
    class AlreadyCalled(ValueError):
    
  682. File: ./../src/twisted/internet/protocol.py:607
            # XXX: According to ITransport, this should return an IAddress!
            return 'file', 'file'
    
        def getHost(self):
            return 'file'
    
        def handleException(self):
    
  683. File: ./../src/twisted/internet/base.py:328
                # XXX - This is *less than* '::', and will screw up IPv6 servers
                return defer.succeed('0.0.0.0')
            if abstract.isIPAddress(name):
                return defer.succeed(name)
    
  684. File: ./../src/twisted/internet/process.py:361
                    # XXX: The parent's stderr isn't necessarily fd 2 anymore, or
                    #      even still available
                    #       thing to attempt
                    try:
                        stderr = os.fdopen(2,'w')
    
  685. File: ./../src/twisted/internet/_sslverify.py:650
        # XXX This could be a useful method, but sometimes it triggers a segfault,
        # so we'll steer clear for now.
    #     def verifyCertificate(self, certificate):
    #         """
    
  686. File: ./../src/twisted/internet/_dumbwin32proc.py:173
            # TODO: error detection here.
            def doCreate():
                self.hProcess, self.hThread, dwPid, dwTid = win32process.CreateProcess(
                    command, cmdline, None, None, 1, 0, env, path, StartupInfo)
    
  687. File: ./../src/twisted/lore/scripts/lore.py:129
        ## TODO: get numberSections from book, if any
        numberer.setNumberSections(opt['number'])
    
        walker.generate()
    
  688. File: ./../src/twisted/lore/__init__.py:11
    # TODO
    # Abstract
    # Bibliography
    # Index
    
  689. File: ./../src/twisted/lore/latex.py:173
            # XXX there's a *reason* Python comes with the pipes module -
            # someone fix this to use it.
            r = os.system('pngtopnm "%s" | pnmtops -noturn > "%s"' % (src, target))
            if r != 0:
    
  690. File: ./../src/twisted/lore/process.py:7
    import tree #todo: get rid of this later
    import indexer
    
    class NoProcessorError(Exception):
    
  691. File: ./../src/twisted/lore/slides.py:112
            # TODO: Syntax highlighting
            buf = StringIO()
            getLatexText(node, buf.write, entities=entities)
            data = buf.getvalue()
    
  692. File: ./../src/twisted/trial/test/test_output.py:145
            ## XXX -- not really an output test, more of a script test
            self.mangleSysPath(self.oldPath)
            d = self.runTrial(
                os.path.join(self.parent,
    
  693. File: ./../src/twisted/trial/test/test_loader.py:13
    # XXX - this is used in test_script, perhaps it should be in a utility module
    def testNames(test):
        """
        Return the id of each test within the given test suite or case.
    
  694. File: ./../src/twisted/trial/test/test_loader.py:270
            ## XXX -- should this instead raise a ValueError? -- jml
            self.failUnlessRaises(TypeError, self.loader.loadPackage, sample)
    
        def test_loadPackageRecursive(self):
    
  695. File: ./../src/twisted/trial/test/test_loader.py:374
        # XXX - duplicated and modified from test_script
        def assertSuitesEqual(self, test1, test2):
            loader = runner.TestLoader()
            names1 = testNames(test1)
    
  696. File: ./../src/twisted/trial/test/test_runner.py:251
            # XXX There should really be a general way to hook the plugin system
            # for tests.
            def getPlugins(iface, *a, **kw):
                self.assertEqual(iface, IReporter)
    
  697. File: ./../src/twisted/trial/runner.py:465
            ## XXX - should I add an optional parameter to disable the check for
            ## a custom suite.
            ## OR, should I add another method
            if not isinstance(module, types.ModuleType):
    
  698. File: ./../src/twisted/trial/unittest.py:821
                # XXX -- this is here because sometimes people will have methods
                # called 'timeout', or set timeout to 'orange', or something
                # Particularly, test_news.NewsTestCase and ReactorCoreTestCase
                # both do this.
    
  699. File: ./../src/twisted/trial/unittest.py:952
                # XXX: if err.tb is a real traceback and not stringified, we should
                #      use that.
                err = (err.type, err.value, None)
            return err
    
  700. File: ./../src/twisted/trial/reporter.py:127
            # XXX - 'todo' should just be a string
            self.unexpectedSuccesses.append((test, todo))
    
        def addExpectedFailure(self, test, error, todo):
    
  701. File: ./../src/twisted/trial/reporter.py:139
            # XXX - 'todo' should just be a string
            self.expectedFailures.append((test, error, todo))
    
        def addSuccess(self, test):
    
  702. File: ./../src/twisted/trial/reporter.py:155
            # XXX - deprecate this method, we don't need it any more
    
        def startSuite(self, name):
            pass
    
        def endSuite(self, name):
            pass
    
    
    
  703. File: ./../src/twisted/spread/flavors.py:453
            # XXX questionable whether this was a good design idea...
            init = getattr(cProxy, "__init__", None)
            if init:
                init()
    
  704. File: ./../src/twisted/spread/jelly.py:537
                    inst = _Dummy() # XXX chomp, chomp
                    inst.__class__ = regClass
                    method = inst.unjellyFor
                elif isinstance(regClass, type):
    
  705. File: ./../src/twisted/spread/jelly.py:690
            # XXX do I need an isFunctionAllowed?
            function = namedObject(rest[0])
            return function
    
    
  706. File: ./../src/twisted/spread/banana.py:312
                # TODO: an API for extending banana...
                if self.currentDialect == "pb" and obj in self.outgoingSymbols:
                    symbolID = self.outgoingSymbols[obj]
                    int2b128(symbolID, write)
    
  707. File: ./../src/twisted/spread/pb.py:568
            # XXX should never get called anymore? check!
            for notifier in self.failures:
                try:
                    notifier()
    
  708. File: ./../src/twisted/spread/pb.py:758
            # XXX This call is NOT REENTRANT and testing for reentrancy is just
            # crazy, so it likely won't be.  Don't ever write methods that call the
            # broker's serialize() method recursively (e.g. sending a method call
            # from within a getState (this causes concurrency problems anyway so
    
  709. File: ./../src/twisted/spread/pb.py:872
                        # XXX Should this be done somewhere else?
                    else:
                        self._sendAnswer(netResult, requestID)
        ##
    
  710. File: ./../src/twisted/spread/pb.py:977
                # TODO: force_decache needs to be able to force-invalidate a
                # cacheable reference.
                try:
                    cacheable.stoppedObserving(perspective, RemoteCacheObserver(self, cacheable, perspective))
    
  711. File: ./../src/zdaemon/zdrun.py:198
                    # XXX We don't know how many to close; hope 100 is plenty.
                    for i in range(3, 100):
                        try:
                            os.close(i)
    
  712. File: ./../src/zdaemon/zdrun.py:391
            # XXX Stevens, in his Advanced Unix book, section 13.3 (page
            # 417) recommends calling umask(0) and closing unused
            # file descriptors.  In his Network Programming book, he
            # additionally recommends ignoring SIGHUP and forking again
    
  713. File: ./../src/ClientForm/ClientForm.py:29
    # XXX
    # Remove unescape_attr method
    # Remove parser testing hack
    # safeUrl()-ize action
    
  714. File: ./../src/ClientForm/ClientForm.py:1292
            # XXX should it be successful even if unnamed?
            if self.name is None or self.disabled:
                return []
            return [(self._index, self.name, "")]
    
  715. File: ./../releases/Zope/test.py:58
    # TODO according to the comment above:
    #      with python 2.5 the above 3 lines should be again:
    # sys.exit(result)
    
  716. File: ./../Makefile:10
    # XXX What should the default be?
    all: inplace runners
    
    # Build in-place
    
  717. File: ./../Makefile:31
    # XXX What should the default be?
    test: test_inplace
    
    ftest: ftest_inplace
    
  718. File: ./../buildsupport/zpkgsetup/package.py:175
        # XXX need tests!
        #
        datamap = {}
        for dir, paths in pkginfo.data_files:
    
  719. File: ./../buildsupport/zpkgsetup/setup.py:238
                        # XXX we shouldn't actually need this if we only
                        # use this class to scan in the generated
                        # distributions
                        if os.path.isfile(
    
  720. File: ./../buildsupport/zpkgsetup/setup.py:259
            # XXX I'm not sure whether documentation files should be
            # removed from package_data or not, given that there's no spec
            # for installing documentation other than for RPMs.
            #