Mercurial > moin > 1.9
changeset 33:55ff4feb0f59
src cosmetics: remove TODOs, CVS stuff
imported from: moin--main--1.5--patch-34
author | Thomas Waldmann <tw@waldmann-edv.de> |
---|---|
date | Sun, 25 Sep 2005 11:36:51 +0000 |
parents | 5153d7c2b1c1 |
children | 3ffdb52c6969 |
files | MoinMoin/Page.py MoinMoin/PageEditor.py MoinMoin/_tests/test_parser_wiki.py MoinMoin/action/AttachFile.py MoinMoin/action/fullsearch.py MoinMoin/error.py MoinMoin/parser/wiki.py MoinMoin/request.py MoinMoin/scripts/__init__.py MoinMoin/scripts/_util.py MoinMoin/scripts/accounts/__init__.py MoinMoin/scripts/accounts/moin_usercheck-jh-new.py MoinMoin/scripts/moin_build_index.py MoinMoin/scripts/moin_dump.py MoinMoin/scripts/moin_optimize_index.py MoinMoin/scripts/xmlrpc-tools/__init__.py MoinMoin/search.py MoinMoin/stats/hitcounts.py MoinMoin/stats/pagesize.py MoinMoin/stats/useragents.py MoinMoin/theme/__init__.py MoinMoin/user.py MoinMoin/wikiaction.py MoinMoin/wikiutil.py MoinMoin/wikixml/util.py MoinMoin/wikixml/xsltutil.py |
diffstat | 26 files changed, 28 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/Page.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/Page.py Sun Sep 25 11:36:51 2005 +0000 @@ -800,12 +800,12 @@ if querystr: querystr = web.makeQueryString(querystr) - # TODO: remove in 1.4 + # TODO: remove in 2.0 # Escape query string to be compatible with old 3rd party code # New code should call with escape=0 to prevent the warning. if escape: import warnings - warnings.warn("In moin 1.4 query string in url will not be" + warnings.warn("In moin 2.0 query string in url will not be" " escaped. See" " http://moinmoin.wikiwikiweb.de/ApiChanges") querystr = wikiutil.escape(querystr)
--- a/MoinMoin/PageEditor.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/PageEditor.py Sun Sep 25 11:36:51 2005 +0000 @@ -1039,15 +1039,13 @@ ) % {'owner': owner, 'timestamp': timestamp, 'mins_valid': mins_valid} else: # warn user about existing lock -### WIKIMARKUP-TODO + result = 1, _( - 'This page was opened for editing or last previewed at %(timestamp)s by %(owner)s.[[BR]]\n' - '\'\'\'' - 'You should \'\'refrain from editing\'\' this page for at least another %(mins_valid)d minute(s),\n' - 'to avoid editing conflicts.' - '\'\'\'[[BR]]\n' - 'To leave the editor, press the Cancel button.' - ) % {'timestamp': timestamp, 'owner': owner, 'mins_valid': mins_valid} +"""This page was opened for editing or last previewed at %(timestamp)s by %(owner)s.[[BR]] +'''You should ''refrain from editing'' this page for at least another %(mins_valid)d minute(s), +to avoid editing conflicts.'''[[BR]] +To leave the editor, press the Cancel button.""") % { + 'timestamp': timestamp, 'owner': owner, 'mins_valid': mins_valid} return result
--- a/MoinMoin/_tests/test_parser_wiki.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/_tests/test_parser_wiki.py Sun Sep 25 11:36:51 2005 +0000 @@ -245,8 +245,7 @@ class InlineCrossingTestCase(ParserTestCase): """ - This test case fail with current parser/formatter and should be - fixed in 1.4 + This test case fail with current parser/formatter and should be fixed in 2.0 """ def disabled_testInlineCrossing(self):
--- a/MoinMoin/action/AttachFile.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/action/AttachFile.py Sun Sep 25 11:36:51 2005 +0000 @@ -125,7 +125,7 @@ if os.path.isdir(attach_dir): files = os.listdir(attach_dir) page = Page(request, pagename) - # TODO: remove escape=0 in 1.4 + # TODO: remove escape=0 in 2.0 link = page.url(request, {'action': 'AttachFile'}, escape=0) attach_info = _('There are <a href="%(link)s">%(count)s attachment(s)</a> stored for this page.', formatted=False) % { 'count': len(files),
--- a/MoinMoin/action/fullsearch.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/action/fullsearch.py Sun Sep 25 11:36:51 2005 +0000 @@ -67,7 +67,7 @@ # improve if we have one... if len(results.hits) == 1: page = Page(request, results.hits[0].page_name) - # TODO: remove escape=0 in 1.4 + # TODO: remove escape=0 in 2.0 url = page.url(request, querystr={'highlight': query.highlight_re()}, escape=0) request.http_redirect(url)
--- a/MoinMoin/error.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/error.py Sun Sep 25 11:36:51 2005 +0000 @@ -1,6 +1,8 @@ # -*- coding: iso-8859-1 -*- """ MoinMoin - supply common error classes. + + TODO: translate strings? @copyright: 2004 by Nir Soffer @license: GNU GPL, see COPYING for details. @@ -23,7 +25,6 @@ When you want to render an error, use unicode() or str() as needed. - TODO: translate strings? """ def __init__(self, message): @@ -64,8 +65,6 @@ what is the error, but still can't continue. Do not use this class but its more specific sub classes. - - TODO: translate strings? """ name = 'MoinMoin Fatal Error' @@ -153,16 +152,12 @@ class ConfigurationError(FatalError): """ Raise when fatal misconfiguration is found - - TODO: translate strings? """ name = 'MoinMoin Configuration Error' class InternalError(FatalError): """ Raise when internal fatal error is found - - TODO: translate strings? """ name = 'MoinMoin Internal Error'
--- a/MoinMoin/parser/wiki.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/parser/wiki.py Sun Sep 25 11:36:51 2005 +0000 @@ -766,7 +766,7 @@ self.in_pre = 3 return self._closeP() + self.formatter.preformatted(1) elif s_word[:2] == '#!': - # first try to find a processor for this (will go away in 1.4) + # first try to find a processor for this (will go away in 2.0) processor_name = s_word[2:].split()[0] self.processor = wikiutil.importPlugin( self.request.cfg, "processor", processor_name, "process")
--- a/MoinMoin/request.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/request.py Sun Sep 25 11:36:51 2005 +0000 @@ -1230,8 +1230,6 @@ = 0 forever, ignoring user 'remember_me' setting > 0 n hours, or forever if user checked 'remember_me' < 0 -n hours, ignoring user 'remember_me' setting - - TODO: do we really need this cookie_lifetime setting? """ # Calculate cookie maxage and expires lifetime = int(self.cfg.cookie_lifetime) * 3600
--- a/MoinMoin/scripts/__init__.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/scripts/__init__.py Sun Sep 25 11:36:51 2005 +0000 @@ -5,5 +5,4 @@ @copyright: 2001 by Jürgen Hermann <jh@web.de> @license: GNU GPL, see COPYING for details. """ -__version__ = "$Revision: 1.3 $"[11:-2]
--- a/MoinMoin/scripts/_util.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/scripts/_util.py Sun Sep 25 11:36:51 2005 +0000 @@ -5,12 +5,9 @@ @copyright: 2000, 2001, 2002 by Jürgen Hermann <jh@web.de> @license: GNU GPL, see COPYING for details. """ -__version__ = "$Revision: 1.6 $"[11:-2] -# Imports import os, sys -# Globals flag_quiet = 0 script_module = '__main__' @@ -55,17 +52,11 @@ from MoinMoin import version cmd = self.script_module.__name__.split('.')[-1].replace('_', '-') - ver = self.script_module.__version__ - rev = "%s (%s %s [%s])" % ( - ver, version.project, version.release, version.revision) + rev = "%s %s [%s]" % (version.project, version.release, version.revision) sys.argv[0] = cmd self.parser = optparse.OptionParser( - usage= - "%(cmd)s %(usage)s\n" - "\n" - "%(cmd)s v%(ver)s, Copyright (c) 2002, 2003 by Jürgen Hermann <jh@web.de>" - % {'cmd': cmd, 'usage': usage, 'ver': ver}, + usage="%(cmd)s %(usage)s\n\n" % {'cmd': cmd, 'usage': usage, }, version=rev) self.parser.add_option( "-q", "--quiet",
--- a/MoinMoin/scripts/accounts/__init__.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/scripts/accounts/__init__.py Sun Sep 25 11:36:51 2005 +0000 @@ -5,5 +5,4 @@ @copyright: 2004 by Thomas Waldmann @license: GNU GPL, see COPYING for details. """ -__version__ = "$Revision: 1.1 $"[11:-2]
--- a/MoinMoin/scripts/accounts/moin_usercheck-jh-new.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/scripts/accounts/moin_usercheck-jh-new.py Sun Sep 25 11:36:51 2005 +0000 @@ -45,8 +45,6 @@ --wikinames --save """ -# $Id: moin_usercheck-jh-new.py,v 1.1 2004/01/30 21:29:57 thomaswaldmann Exp $ -__version__ = "$Revision: 1.1 $"[11:-2] # ---------------------------------------------------------------------------- # if a user subsribes to magicpages, it means that he wants to keep
--- a/MoinMoin/scripts/moin_build_index.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/scripts/moin_build_index.py Sun Sep 25 11:36:51 2005 +0000 @@ -9,7 +9,6 @@ @copyright: 2005 by Florian Festi, Nir Soffer @license: GNU GPL, see COPYING for details. """ -__version__ = "1.0" import os
--- a/MoinMoin/scripts/moin_dump.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/scripts/moin_dump.py Sun Sep 25 11:36:51 2005 +0000 @@ -10,8 +10,6 @@ @license: GNU GPL, see COPYING for details. """ -__version__ = "20050725" - import os, time, StringIO, codecs, shutil, errno # Insert the path to MoinMoin in the start of the path
--- a/MoinMoin/scripts/moin_optimize_index.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/scripts/moin_optimize_index.py Sun Sep 25 11:36:51 2005 +0000 @@ -9,7 +9,6 @@ @copyright: 2005 by Florian Festi, Nir Soffer @license: GNU GPL, see COPYING for details. """ -__version__ = "1.0" import os
--- a/MoinMoin/scripts/xmlrpc-tools/__init__.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/scripts/xmlrpc-tools/__init__.py Sun Sep 25 11:36:51 2005 +0000 @@ -5,5 +5,4 @@ @copyright: 2004 by Thomas Waldmann @license: GNU GPL, see COPYING for details. """ -__version__ = "$Revision: 1.1 $"[11:-2]
--- a/MoinMoin/search.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/search.py Sun Sep 25 11:36:51 2005 +0000 @@ -773,14 +773,12 @@ @return formatted statistics """ _ = request.getText - f = formatter output = [ - f.paragraph(1), - # TODO: update to "results of about" in 1.4 - f.text(_("%(hits)d results out of %(pages)d pages.") % + formatter.paragraph(1), + formatter.text(_("%(hits)d results out of about %(pages)d pages.") % {'hits': len(self.hits), 'pages': self.pages}), - u' (%s)' % f.text(_("%.2f seconds") % self.elapsed), - f.paragraph(0), + u' (%s)' % formatter.text(_("%.2f seconds") % self.elapsed), + formatter.paragraph(0), ] return ''.join(output)
--- a/MoinMoin/stats/hitcounts.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/stats/hitcounts.py Sun Sep 25 11:36:51 2005 +0000 @@ -41,7 +41,7 @@ if params: querystr += '&' + params - # TODO: remove escape=0 in 1.4 + # TODO: remove escape=0 in 2.0 data = {'url': page.url(request, querystr, escape=0)} data.update(request.cfg.chart_options) result = ('<img src="%(url)s" width="%(width)d" height="%(height)d"'
--- a/MoinMoin/stats/pagesize.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/stats/pagesize.py Sun Sep 25 11:36:51 2005 +0000 @@ -36,7 +36,7 @@ if params: querystr += '&' + params - # TODO: remove escape=0 in 1.4 + # TODO: remove escape=0 in 2.0 data = {'url': page.url(request, querystr, escape=0)} data.update(request.cfg.chart_options) result = ('<img src="%(url)s" width="%(width)d" height="%(height)d"'
--- a/MoinMoin/stats/useragents.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/stats/useragents.py Sun Sep 25 11:36:51 2005 +0000 @@ -37,7 +37,7 @@ if params: querystr += '&' + params - # TODO: remove escape=0 in 1.4 + # TODO: remove escape=0 in 2.0 data = {'url': page.url(request, querystr, escape=0)} data.update(request.cfg.chart_options) result = ('<img src="%(url)s" width="%(width)d" height="%(height)d"'
--- a/MoinMoin/theme/__init__.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/theme/__init__.py Sun Sep 25 11:36:51 2005 +0000 @@ -743,7 +743,7 @@ //--> </script> """ % { - 'search_hint' : _('Search:', formatted=False).replace(':',''), # XXX TODO make own i18n string in 1.4 + 'search_hint' : _('Search', formatted=False), } return script
--- a/MoinMoin/user.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/user.py Sun Sep 25 11:36:51 2005 +0000 @@ -730,7 +730,7 @@ @param pagename: the page name to add to the trail """ - # TODO: acquire lock here, so multiple processes don't clober + # TODO: acquire lock here, so multiple processes don't clobber # each one trail. if self.valid and (self.show_page_trail or self.remember_last_visit): @@ -776,8 +776,6 @@ finally: file.close() - # TODO: do we realy need to set perimssion for each save, which - # is on each request? try: os.chmod(path, 0666 & config.umask) except OSError, err:
--- a/MoinMoin/wikiaction.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/wikiaction.py Sun Sep 25 11:36:51 2005 +0000 @@ -256,9 +256,7 @@ Column('rev', label='#', align='right'), Column('mtime', label=_('Date'), align='right'), Column('size', label=_('Size'), align='right'), - Column('diff', label='<input type="submit" value="%s">' % (_("Diff"))), - # TODO: translate to English - # entfernt, nicht 4.01 compliant: href="%s" % page.url(request) + Column('diff', label='<input type="submit" value="%s">' % (_("Diff"))), Column('editor', label=_('Editor'), hidden=not request.cfg.show_hosts), Column('comment', label=_('Comment')), Column('action', label=_('Action')), @@ -376,7 +374,7 @@ request.write(_('No log entries found.')) return - # TODO: this form activate revert, which should use post, but + # TODO: this form activates revert, which should use POST, but # other actions should use get. Maybe we should put the revert # into the page view itself, and not in this form. request.write('<form method="GET" action="">\n')
--- a/MoinMoin/wikiutil.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/wikiutil.py Sun Sep 25 11:36:51 2005 +0000 @@ -1155,7 +1155,7 @@ request.user.edit_on_doubleclick): if request.user.may.write(pagename): # separating this gains speed querystr = escape(util.web.makeQueryString({'action': 'edit'})) - # TODO: remove escape=0 in 1.4 + # TODO: remove escape=0 in 2.0 url = page.url(request, querystr, escape=0) bodyattr.append(''' ondblclick="location.href='%s'"''' % url)
--- a/MoinMoin/wikixml/util.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/wikixml/util.py Sun Sep 25 11:36:51 2005 +0000 @@ -5,7 +5,6 @@ @copyright: 2001 by Jürgen Hermann <jh@web.de> @license: GNU GPL, see COPYING for details. """ -__version__ = "$Revision: 1.4 $"[11:-2] from xml.sax import saxutils from MoinMoin import config
--- a/MoinMoin/wikixml/xsltutil.py Sun Sep 25 10:37:48 2005 +0000 +++ b/MoinMoin/wikixml/xsltutil.py Sun Sep 25 11:36:51 2005 +0000 @@ -5,7 +5,6 @@ @copyright: 2001, 2003 by Jürgen Hermann <jh@web.de> @license: GNU GPL, see COPYING for details. """ -__version__ = "$Revision: 1.4 $"[11:-2] ## currently empty, due to adaption to 4Suite 1.0a1 ## keep this file for later!