changeset 1832:b180f047d918

comments only: cleaned up TODO, XXX, ...
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 25 Feb 2007 23:45:07 +0100
parents bff1080d37d4
children af0feb0e3c7b
files MoinMoin/PageEditor.py MoinMoin/PageGraphicalEditor.py MoinMoin/action/AttachFile.py MoinMoin/action/fullsearch.py MoinMoin/action/info.py MoinMoin/auth/__init__.py MoinMoin/auth/interwiki.py MoinMoin/error.py MoinMoin/formatter/dom_xml.py MoinMoin/i18n/__init__.py MoinMoin/macro/FullSearch.py MoinMoin/macro/__init__.py MoinMoin/request/CLI.py MoinMoin/search/builtin.py MoinMoin/stats/hitcounts.py MoinMoin/support/thfcgi.py MoinMoin/theme/__init__.py MoinMoin/user.py MoinMoin/wikiutil.py contrib/auth_externalcookie/wikiconfig.py setup.py
diffstat 21 files changed, 36 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/PageEditor.py	Sun Feb 25 23:45:07 2007 +0100
@@ -386,9 +386,8 @@
 
         # Add textarea with page text
 
-        # TODO: currently self.language is None at this point. We have
-        # to do processing instructions parsing earlier, or move page
-        # language into meta file.
+        # TODO: currently self.language is None at this point.
+        # We have to do processing instructions parsing earlier, or move page language into meta file.
         lang = self.language or request.cfg.language_default
 
         self.sendconfirmleaving()
--- a/MoinMoin/PageGraphicalEditor.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/PageGraphicalEditor.py	Sun Feb 25 23:45:07 2007 +0100
@@ -281,9 +281,8 @@
 
         # Add textarea with page text
 
-        # TODO: currently self.language is None at this point. We have
-        # to do processing instructions parsing earlier, or move page
-        # language into meta file.
+        # TODO: currently self.language is None at this point.
+        # We have to do processing instructions parsing earlier, or move page language into meta file.
         lang = self.language or request.cfg.language_default
         contentlangdirection = i18n.getDirection(lang) # 'ltr' or 'rtl'
         uilanguage = request.lang
--- a/MoinMoin/action/AttachFile.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/action/AttachFile.py	Sun Feb 25 23:45:07 2007 +0100
@@ -230,7 +230,6 @@
     t = wikiutil.timestamp2version(time.time())
     fname = wikiutil.url_quote(filename, want_unicode=True)
 
-    # TODO: for now we simply write 2 logs, maybe better use some multilog stuff
     # Write to global log
     log = editlog.EditLog(request)
     log.add(request, t, 99999999, action, pagename, request.remote_addr, fname)
--- a/MoinMoin/action/fullsearch.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/action/fullsearch.py	Sun Feb 25 23:45:07 2007 +0100
@@ -71,8 +71,7 @@
     if titlesearch:
         context = 0
     elif advancedsearch:
-        # XXX: hardcoded
-        context = 180
+        context = 180 # XXX: hardcoded context count for advancedsearch
     else:
         context = int(request.form.get('context', [0])[0])
 
--- a/MoinMoin/action/info.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/action/info.py	Sun Feb 25 23:45:07 2007 +0100
@@ -94,7 +94,7 @@
 
         def render_action(text, query, **kw):
             kw.update(dict(rel='nofollow'))
-            if 0: # diff button doesnt work XXX
+            if 0: # XXX diff button doesnt work
                 params_html = []
                 for k, v in query.items():
                     params_html.append('<input type="hidden" name="%s" value="%s">' % (k, v))
@@ -200,9 +200,8 @@
 
     request.emit_http_headers()
 
-    # This action uses page or wiki language TODO: currently
-    # page.language is broken and not available now, when we fix it,
-    # this will be automatically fixed.
+    # This action uses page or wiki language
+    # TODO: currently page.language is broken and not available now.
     lang = page.language or request.cfg.language_default
     request.setContentLanguage(lang)
     f = request.formatter
--- a/MoinMoin/auth/__init__.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/auth/__init__.py	Sun Feb 25 23:45:07 2007 +0100
@@ -36,7 +36,6 @@
     method that authentified the user.
 
     TODO: check against other cookie work (see wiki)  
-          reduce amount of XXX
           
     @copyright: 2005-2006 Bastian Blank, Florian Festi, MoinMoin:ThomasWaldmann,
                           MoinMoin:AlexanderSchremmer, Nick Phillips,
--- a/MoinMoin/auth/interwiki.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/auth/interwiki.py	Sun Feb 25 23:45:07 2007 +0100
@@ -12,7 +12,6 @@
 from MoinMoin import auth, wikiutil, user
 
 def interwiki(request, **kw):
-    # TODO use auth_method and auth_attribs for User object
     username = kw.get('name')
     password = kw.get('password')
     login = kw.get('login')
@@ -32,6 +31,7 @@
                 # show error message
                 return user_obj, True
 
+            # TODO: use auth_method and auth_attribs for User object
             u = user.User(request, name=username)
             for key, value in account_data.iteritems():
                 if key not in ["may", "id", "valid", "trusted"
@@ -44,7 +44,7 @@
             return u, True
         else:
             pass
-            # XXX redirect to homewiki
+            # TODO: redirect to homewiki
 
     return user_obj, True
 
--- a/MoinMoin/error.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/error.py	Sun Feb 25 23:45:07 2007 +0100
@@ -26,8 +26,6 @@
     to unicode or the unicode to string, using config.charset.
             
     When you want to render an error, use unicode() or str() as needed.
-    
-    TODO: translate strings?
     """
 
     def __init__(self, message):
--- a/MoinMoin/formatter/dom_xml.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/formatter/dom_xml.py	Sun Feb 25 23:45:07 2007 +0100
@@ -31,7 +31,7 @@
 
     # those tags want a <p> around them:
     need_p = [] # format_tags[:]
-    need_p.extend(['ol', 'a', 'pagelink', 'interwiki', 'macro']) # XXX add more
+    need_p.extend(['ol', 'a', 'pagelink', 'interwiki', 'macro']) # XXX add more tags
 
     # those tags inhibit auto-generation of a <p> after them:
     no_p_after = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'ol', 'ul', 'pre',
@@ -53,13 +53,13 @@
     # if key tag is closed, auto-close all tags in value list if they are open
     close_on_close = {
         'table': ['td', 'tr'],
-        'td': ['tr'], # XXX WTF?
+        'td': ['tr'], # XXX WTF? this doesn't look correct.
         'tr': ['td'],
         'ol': ['li'],
         'ul': ['li'],
         }
 
-    # FIXME - this overrides the values defined above - FIXME XXX
+    # FIXME - this overrides the values defined above
     close_on_open = {}
     close_on_close = {}
 
--- a/MoinMoin/i18n/__init__.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/i18n/__init__.py	Sun Feb 25 23:45:07 2007 +0100
@@ -61,7 +61,7 @@
         i18n_dir = os.path.join(request.cfg.moinmoin_dir, 'i18n')
         if meta_cache.needsUpdate(i18n_dir):
             _languages = {}
-            for lang_file in glob.glob(po_filename(request, language='*', domain='MoinMoin')): # only MoinMoin domain for now XXX
+            for lang_file in glob.glob(po_filename(request, language='*', domain='MoinMoin')): # XXX only MoinMoin domain for now
                 language, domain, ext = os.path.basename(lang_file).split('.')
                 t = Translation(language, domain)
                 f = file(lang_file)
--- a/MoinMoin/macro/FullSearch.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/macro/FullSearch.py	Sun Feb 25 23:45:07 2007 +0100
@@ -19,9 +19,8 @@
     interactive search, and this kind of search is used usually for
     Category pages, where we don't care about the context.
 
-    TODO: If we need to have context for some cases, either we add a
-    context argument, or make another macro that use context, which may
-    be easier to use.
+    TODO: If we need to have context for some cases, either we add a context argument,
+          or make another macro that uses context, which may be easier to use.
 
     @copyright: 2000-2004 by Jürgen Hermann <jh@web.de>,
                 2005 MoinMoin:FranzPletz
--- a/MoinMoin/macro/__init__.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/macro/__init__.py	Sun Feb 25 23:45:07 2007 +0100
@@ -171,10 +171,8 @@
             the whole page name, so we only get one fragment that is the same
             as the pagename.
 
-            TODO: later this can get a macro on its own, more powerful and less
-                  special than WordIndex and TitleIndex.
-                  It should be able to filter for specific mimetypes, maybe match
-                  pagenames by regex (replace PageList?), etc.
+            TODO: _make_index could get a macro on its own, more powerful / less special than WordIndex and TitleIndex.
+                  It should be able to filter for specific mimetypes, maybe match pagenames by regex (replace PageList?), etc.
         """
         _ = self._
         request = self.request
--- a/MoinMoin/request/CLI.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/request/CLI.py	Sun Feb 25 23:45:07 2007 +0100
@@ -22,7 +22,7 @@
         self.http_user_agent = 'CLI/Script'
         self.url = url
         self.request_method = 'GET'
-        self.request_uri = '/' + pagename # TODO check
+        self.request_uri = '/' + pagename # TODO check if /pagename works as URI for CLI usage
         self.http_host = 'localhost'
         self.http_referer = ''
         self.script_name = '.'
--- a/MoinMoin/search/builtin.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/search/builtin.py	Sun Feb 25 23:45:07 2007 +0100
@@ -380,7 +380,6 @@
                 logging.info("Cannot load filter for mimetype." + modulename)
         try:
             data = execute(self, filename)
-            # XXX: proper debugging?
             #if debug:
             #    logging.info("Filter %s returned %d characters for file %s" % (modulename, len(data), filename))
         except (OSError, IOError), err:
--- a/MoinMoin/stats/hitcounts.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/stats/hitcounts.py	Sun Feb 25 23:45:07 2007 +0100
@@ -4,9 +4,9 @@
 
     This macro creates a hitcount chart from the data in "event.log".
 
-    TODO: refactor to use a class, this code is ugly. A lot of code
-    here is duplicated in stats.useragents. Maybe both can use same
-    base class, maybe some parts are useful to other code.
+    TODO: refactor to use a class, this code is ugly.
+          A lot of code here is duplicated in stats.useragents.
+          Maybe both can use same base class, maybe some parts are useful to other code.
 
     @copyright: 2002-2004 by Jürgen Hermann <jh@web.de>
     @license: GNU GPL, see COPYING for details.
--- a/MoinMoin/support/thfcgi.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/support/thfcgi.py	Sun Feb 25 23:45:07 2007 +0100
@@ -30,11 +30,8 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 """
 
-# TODO:
-#
-# Compare compare the number of bytes received on FCGI_STDIN with
-# CONTENT_LENGTH and abort the update if the two numbers are not equal.
-#
+# TODO: Compare compare the number of bytes received on FCGI_STDIN with
+#       CONTENT_LENGTH and abort the update if the two numbers are not equal.
 
 debug = False
 
--- a/MoinMoin/theme/__init__.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/theme/__init__.py	Sun Feb 25 23:45:07 2007 +0100
@@ -446,7 +446,7 @@
             items.append(item % (cls, link))
 
         # Add sister pages.
-        for sistername in request.cfg.sistersites: # TODO: sort?
+        for sistername in request.cfg.sistersites: # TODO: sort sistersites?
             if sistername == request.cfg.interwikiname: # it is THIS wiki
                 cls = 'sisterwiki current'
                 items.append(item % (cls, sistername))
@@ -674,9 +674,8 @@
         """
         if page.exists() and self.request.user.may.read(page.page_name):
             # These  actions show the  page content.
-            # TODO: on new action, page info will not show. A better
-            # solution will be if the action itself answer the question:
-            # showPageInfo().
+            # TODO: on new action, page info will not show.
+            # A better solution will be if the action itself answer the question: showPageInfo().
             contentActions = [u'', u'show', u'refresh', u'preview', u'diff',
                               u'subscribe', u'RenamePage', u'DeletePage',
                               u'SpellCheck', u'print']
@@ -879,9 +878,8 @@
         enabled browsers, and acceptable behavior for those who prefer
         not to use Javascript.
 
-        TODO: Move actionsMenuInit() into body onload. This require
-        that the theme will render body, its currently done on
-        wikiutil/page.
+        TODO: Move actionsMenuInit() into body onload - requires that the theme will render body,
+              it is currently done in wikiutil/page.
         
         @param page: current page, Page object
         @rtype: unicode
--- a/MoinMoin/user.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/user.py	Sun Feb 25 23:45:07 2007 +0100
@@ -687,9 +687,6 @@
         must check if the user is still subscribed to the page after we
         try to remove names from the list.
 
-        TODO: should we remove non-interwiki subscription? what if the
-        user want to subscribe to the same page in multiple wikis?
-
         @param pagename: name of the page to subscribe
         @type pagename: unicode
         @rtype: bool
--- a/MoinMoin/wikiutil.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/MoinMoin/wikiutil.py	Sun Feb 25 23:45:07 2007 +0100
@@ -1307,7 +1307,7 @@
     def _parse_pattern(self, pattern):
         param_re = r"(%(?P<name>\(.*?\))?(?P<type>[ibfs]{1,3}))|\|"
         i = 0
-        #TODO: Optionals aren't checked
+        # TODO: Optionals aren't checked.
         self.optional = []
         named = False
         self.param_list = []
@@ -1561,7 +1561,7 @@
                 attrs += ' id="%s"' % id
             if name:
                 attrs += ' name="%s"' % name
-            tag = '<a%s href="%s/%s">' % (attrs, request.getScriptname(), params) # XXX wikiutil.escape(params) !?
+            tag = '<a%s href="%s/%s">' % (attrs, request.getScriptname(), params)
             if not on:
                 tag = "%s%s</a>" % (tag, text)
         request.log("Warning: wikiutil.link_tag called without formatter and without request.html_formatter. tag=%r" % (tag, ))
--- a/contrib/auth_externalcookie/wikiconfig.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/contrib/auth_externalcookie/wikiconfig.py	Sun Feb 25 23:45:07 2007 +0100
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 # This is some sample code you might find useful when you want to use some
 # external cookie (made by some other program, not moin) with moin.
-# See the XXX places for customizing it to your needs. You need to put this
+# See the +++ places for customizing it to your needs. You need to put this
 # code into your farmconfig.py or wikiconfig.py.
 
 # HINT: this code is slightly outdated, if you fix it to work with 1.6, please send us a copy.
@@ -13,7 +13,7 @@
         import Cookie
         user = None
         try_next = True # if True, moin tries the next auth method
-        cookiename = "whatever" # XXX external cookie name you want to use
+        cookiename = "whatever" # +++ external cookie name you want to use
 
         try:
             cookie = Cookie.SimpleCookie(request.saved_cookie)
@@ -23,7 +23,7 @@
         if cookie and cookie.has_key(cookiename):
             import urllib
             cookievalue = cookie[cookiename].value
-            # XXX now we decode and parse the cookie value - edit this to fit your needs.
+            # +++ now we decode and parse the cookie value - edit this to fit your needs.
             # the minimum we need to get is auth_username. aliasname and email is optional.
             cookievalue = urllib.unquote(cookievalue) # cookie value is urlencoded, decode it
             cookievalue = cookievalue.decode('iso-8859-1') # decode cookie charset to unicode
@@ -34,7 +34,7 @@
             try:
                 aliasname = "%s %s" % (cookievalue[1], cookievalue[2]) # aliasname is for cosmetical stuff only
                 email = cookievalue[3]
-            except IndexError: # XXX this is for debugging it, in case it does not work
+            except IndexError: # +++ this is for debugging it, in case it does not work
                 if 0:
                     f = open("cookie.log", "w")
                     f.write(repr(cookie))
--- a/setup.py	Sun Feb 25 22:51:30 2007 +0100
+++ b/setup.py	Sun Feb 25 23:45:07 2007 +0100
@@ -153,7 +153,7 @@
                 'python': os.path.normpath(sys.executable),
                 'package': self.package_name,
                 'module': module,
-                'package_location': '/usr/lib/python/site-packages', # FIXME
+                'package_location': '/usr/lib/python/site-packages', # FIXME: we need to know the correct path
             }
 
             self.announce("creating %s" % outfile)