changeset 931:141083b64fb1

whitespace and minor style changes only
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 08 Jul 2006 21:21:36 +0200
parents dec2797d37bc
children da5d404f4d97
files MoinMoin/caching.py MoinMoin/error.py MoinMoin/failure.py MoinMoin/multiconfig.py MoinMoin/packages.py MoinMoin/userform.py MoinMoin/version.py MoinMoin/wikidicts.py MoinMoin/wikiutil.py
diffstat 9 files changed, 186 insertions(+), 187 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/caching.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/caching.py	Sat Jul 08 21:21:36 2006 +0200
@@ -13,7 +13,7 @@
 locking = 1
 if locking:
     from MoinMoin.util import lock
-    
+
 class CacheEntry:
     def __init__(self, request, arena, key, scope='page_or_wiki', do_locking=True):
         """ init a cache entry
@@ -49,7 +49,7 @@
             self.lock_dir = os.path.join(self.arena_dir, '__lock__')
             self.rlock = lock.ReadLock(self.lock_dir, 60.0)
             self.wlock = lock.WriteLock(self.lock_dir, 60.0)
-        
+
     def _filename(self):
         return os.path.join(self.arena_dir, self.key)
 
@@ -73,7 +73,7 @@
             return 1
 
         needsupdate = ftime > ctime
-        
+
         # if a page depends on the attachment dir, we check this, too:
         if not needsupdate and attachdir:
             try:
@@ -81,7 +81,7 @@
             except os.error:
                 ftime2 = 0
             needsupdate = ftime2 > ctime
-                
+
         return needsupdate
 
     def copyto(self, filename):
--- a/MoinMoin/error.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/error.py	Sat Jul 08 21:21:36 2006 +0200
@@ -43,7 +43,7 @@
             return unicode(self.message, config.charset)
         else:
             return unicode(self.message)
-    
+
     def __str__(self):
         """ Return encoded message """
         if isinstance(self.message, unicode):
@@ -54,7 +54,7 @@
     def __getitem__(self, item):
         """ Make it possible to access attributes like a dict """
         return getattr(self, item)
-    
+
 
 class CompositeError(Error):
     ''' Base class for exceptions containing an exception
@@ -82,7 +82,7 @@
         """ Save system exception info before this exception is raised """
         Error.__init__(self, message)
         self.innerException = sys.exc_info()
-   
+
     def exceptions(self):
         """ Return a list of all inner exceptions """
         all = [self.innerException]
@@ -94,7 +94,6 @@
                 break
         return all
 
-   
 class FatalError(CompositeError):
     """ Base class for fatal error we can't handle
 
@@ -106,3 +105,4 @@
 
 class InternalError(FatalError):
     """ Raise when internal fatal error is found """
+
--- a/MoinMoin/failure.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/failure.py	Sat Jul 08 21:21:36 2006 +0200
@@ -27,7 +27,7 @@
     developers. This moin specific subclass is an example.
     """
     debugInfoID = 'debug-info'
-    
+
     def formatContent(self):
         content = (
             self.script(),
@@ -39,7 +39,7 @@
             self.formatTextTraceback()
             )
         return ''.join(content)
-    
+
     def script(self):
         return '''
 <script type="text/javascript">
@@ -62,26 +62,26 @@
         f = self.formatter
         text = [self.formatExceptionMessage(self.info),
                 f.paragraph("If you want to report a bug, please save "
-                            "this page and  attach it to your bug report."),]
+                            "this page and  attach it to your bug report."), ]
         return ''.join(text)
 
     def formatButtons(self):
         """ Add 'buttons' to the error dialog """
         f = self.formatter
-        buttons = [f.link('javascript:toggleDebugInfo()', 
+        buttons = [f.link('javascript:toggleDebugInfo()',
                           'Show debugging information'),
-                   f.link('http://moinmoin.wikiwikiweb.de/MoinMoinBugs', 
+                   f.link('http://moinmoin.wikiwikiweb.de/MoinMoinBugs',
                           'Report bug'),
-                   f.link('http://moinmoin.wikiwikiweb.de/FrontPage', 
-                          'Visit MoinMoin wiki'),]
+                   f.link('http://moinmoin.wikiwikiweb.de/FrontPage',
+                          'Visit MoinMoin wiki'), ]
         return f.list(buttons, {'class': 'buttons'})
-    
+
     def formatDebugInfo(self):
         """ Put debugging information in a hidden div """
         attributes = {'id': self.debugInfoID}
         info = [self.debugInfoHideScript(),
                 self.formatTraceback(),
-                self.formatSystemDetails(),]
+                self.formatSystemDetails(), ]
         return self.formatter.section(''.join(info), attributes)
 
     def debugInfoHideScript(self):
@@ -94,16 +94,16 @@
 
     def formatTraceback(self):
         return self.formatAllTracebacks(self.formatOneTraceback)
-        
+
     def formatTextTraceback(self):
         template = self.textTracebackTemplate()
-        return template % self.formatAllTracebacks(self.formatOneTextTraceback)        
+        return template % self.formatAllTracebacks(self.formatOneTextTraceback)
 
     def formatAllTracebacks(self, formatFuction):
         """ Format multiple tracebacks using formatFunction """
         tracebacks = []
         for type, value, tb in self.exceptions():
-            if type is None: 
+            if type is None:
                 break
             tracebacks.append(formatFuction((type, value, tb)))
             del tb
@@ -145,10 +145,10 @@
         request.write('<pre>\n')
         printTextException(request, savedError)
         request.write('\nAdditionally cgitb raised this exception:\n')
-        printTextException(request)        
+        printTextException(request)
         request.write('</pre>\n')
 
-        
+
 def printTextException(request, info=None):
     """ Simple text exception that should never fail
     
--- a/MoinMoin/multiconfig.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/multiconfig.py	Sat Jul 08 21:21:36 2006 +0200
@@ -76,7 +76,7 @@
 If you run a single wiki you do not need farmconfig.py. Delete it and
 use wikiconfig.py.
 """
-                raise error.ConfigurationError(msg)    
+                raise error.ConfigurationError(msg)
     return _url_re_cache
 
 
@@ -149,7 +149,7 @@
 ''' % {
     'url': url,
 }
-    raise error.ConfigurationError(msg)    
+    raise error.ConfigurationError(msg)
 
 
 def getConfig(url):
@@ -179,18 +179,18 @@
 
 class DefaultConfig:
     """ default config values """
-    
+
     # All acl_rights_* lines must use unicode!
     acl_rights_default = u"Trusted:read,write,delete,revert Known:read,write,delete,revert All:read,write"
     acl_rights_before = u""
     acl_rights_after = u""
     acl_rights_valid = ['read', 'write', 'delete', 'revert', 'admin']
-    
+
     actions_excluded = [] # ['DeletePage', 'AttachFile', 'RenamePage', 'test', ]
     allow_xslt = 0
     attachments = None # {'dir': path, 'url': url-prefix}
-    auth = [authmodule.moin_login, authmodule.moin_session,]
-    
+    auth = [authmodule.moin_login, authmodule.moin_session, ]
+
     backup_compression = 'gz'
     backup_users = []
     backup_include = []
@@ -202,7 +202,7 @@
         ]
     backup_storage_dir = '/tmp'
     backup_restore_target_dir = '/tmp'
-    
+
     bang_meta = 1
     caching_formats = ['text_html']
     changed_time_fmt = '%H:%M'
@@ -212,27 +212,27 @@
     # if you have gdchart, add something like
     # chart_options = {'width = 720, 'height': 540}
     chart_options = None
-    
+
     config_check_enabled = 0
 
     cookie_domain = None # use '.domain.tld" for a farm with hosts in that domain
     cookie_path = None   # use '/wikifarm" for a farm with pathes below that path
     cookie_lifetime = 12 # 12 hours from now
     cookie_secret = '1234' # secret value for crypting session cookie - you should change this :)
-    
+
     data_dir = './data/'
     data_underlay_dir = './underlay/'
-    
+
     date_fmt = '%Y-%m-%d'
     datetime_fmt = '%Y-%m-%d %H:%M:%S'
-    
+
     default_markup = 'wiki'
     docbook_html_dir = r"/usr/share/xml/docbook/stylesheet/nwalsh/html/" # correct for debian sarge
-    
+
     editor_default = 'text' # which editor is called when nothing is specified
     editor_ui = 'freechoice' # which editor links are shown on user interface
     editor_force = False
-    editor_quickhelp = { # editor markup hints quickhelp 
+    editor_quickhelp = {# editor markup hints quickhelp 
         'wiki': _("""\
  Emphasis:: [[Verbatim('')]]''italics''[[Verbatim('')]]; [[Verbatim(''')]]'''bold'''[[Verbatim(''')]]; [[Verbatim(''''')]]'''''bold italics'''''[[Verbatim(''''')]]; [[Verbatim('')]]''mixed ''[[Verbatim(''')]]'''''bold'''[[Verbatim(''')]] and italics''[[Verbatim('')]]; [[Verbatim(----)]] horizontal rule.
  Headings:: [[Verbatim(=)]] Title 1 [[Verbatim(=)]]; [[Verbatim(==)]] Title 2 [[Verbatim(==)]]; [[Verbatim(===)]] Title 3 [[Verbatim(===)]];   [[Verbatim(====)]] Title 4 [[Verbatim(====)]]; [[Verbatim(=====)]] Title 5 [[Verbatim(=====)]].
@@ -264,7 +264,7 @@
     }
     edit_locking = 'warn 10' # None, 'warn <timeout mins>', 'lock <timeout mins>'
     edit_rows = 20
-                
+
     hacks = {} # { 'feature1': value1, ... }
                # Configuration for features still in development.
                # For boolean stuff just use config like this:
@@ -274,7 +274,7 @@
                # A non-existing hack key should ever mean False, None, "", [] or {}!
 
     hosts_deny = []
-    
+
     html_head = ''
     html_head_queries = '''<meta name="robots" content="noindex,nofollow">\n'''
     html_head_posts   = '''<meta name="robots" content="noindex,nofollow">\n'''
@@ -303,7 +303,7 @@
     mail_import_subpage_template = u"$from-$date-$subject" # used for mail import
     mail_import_wiki_address = None # the e-mail address for e-mails that should go into the wiki
     mail_import_secret = ""
-    
+
     navi_bar = [u'RecentChanges', u'FindPage', u'HelpContents', ]
     nonexist_qm = 0
 
@@ -317,7 +317,7 @@
 
     page_header1 = ''
     page_header2 = ''
-    
+
     page_front_page = u'HelpOnLanguages' # this will make people choose a sane config
     page_local_spelling_words = u'LocalSpellingWords'
     page_category_regex = u'^Category[A-Z]'
@@ -331,7 +331,7 @@
     # These icons will show in this order in the iconbar, unless they
     # are not relevant, e.g email icon when the wiki is not configured
     # for email.
-    page_iconbar = ["up", "edit", "view", "diff", "info", "subscribe", "raw", "print",]
+    page_iconbar = ["up", "edit", "view", "diff", "info", "subscribe", "raw", "print", ]
 
     # Standard buttons in the iconbar
     page_icons_table = {
@@ -349,7 +349,7 @@
         'view':        ("%(q_page_name)s", _("View"), "view"),
         'up':          ("%(q_page_parent_page)s", _("Up"), "up"),
         }
-    
+
     refresh = None # (minimum_delay, type), e.g.: (2, 'internal')
     rss_cache = 60 # suggested caching time for RecentChanges RSS, in seconds
     shared_intermap = None # can be string or list of strings (filenames)
@@ -363,8 +363,8 @@
     siteid = 'default'
     stylesheets = [] # list of tuples (media, csshref) to insert after theme css, before user css
     superuser = [] # list of unicode user names that have super powers :)
-    
-    surge_action_limits = { # allow max. <count> <action> requests per <dt> secs
+
+    surge_action_limits = {# allow max. <count> <action> requests per <dt> secs
         # action: (count, dt)
         'all': (30, 30),
         'show': (30, 60),
@@ -378,13 +378,13 @@
         'default': (30, 60),
     }
     surge_lockout_time = 3600 # secs you get locked out when you ignore warnings
-    
+
     theme_default = 'modern'
     theme_force = False
-    
+
     trail_size = 5
     tz_offset = 0.0 # default time zone offset in hours from UTC
-    
+
     user_autocreate = False # do we auto-create user profiles
     user_email_unique = True # do we check whether a user's email is unique?
 
@@ -399,7 +399,7 @@
     url_prefix = '/wiki'
     logo_string = None
     interwikiname = None
-    
+
     url_mappings = {}
 
     user_checkbox_fields = [
@@ -414,13 +414,13 @@
         ('wikiname_add_spaces', lambda _: _('Add spaces to displayed wiki names')),
         ('remember_me', lambda _: _('Remember login information')),
         ('want_trivial', lambda _: _('Subscribe to trivial changes')),
-        
+
         ('disabled', lambda _: _('Disable this account forever')),
         # if an account is disabled, it may be used for looking up
         # id -> username for page info and recent changes, but it
         # is not usable for the user any more:
     ]
-    
+
     user_checkbox_defaults = {'mailto_author':       0,
                               'edit_on_doubleclick': 0,
                               'remember_last_visit': 0,
@@ -433,16 +433,16 @@
                               'remember_me':         1,
                               'want_trivial':        0,
                              }
-    
+
     # don't let the user change those
     # user_checkbox_disable = ['disabled', 'want_trivial']
     user_checkbox_disable = []
-    
+
     # remove those checkboxes:
     #user_checkbox_remove = ['edit_on_doubleclick', 'show_nonexist_qm', 'show_toolbar', 'show_topbottom',
     #                        'show_fancy_diff', 'wikiname_add_spaces', 'remember_me', 'disabled',]
     user_checkbox_remove = []
-    
+
     user_form_fields = [
         ('name', _('Name'), "text", "36", _("(Use Firstname''''''Lastname)")),
         ('aliasname', _('Alias-Name'), "text", "36", ''),
@@ -452,8 +452,8 @@
         ('css_url', _('User CSS URL'), "text", "40", _('(Leave it empty for disabling user CSS)')),
         ('edit_rows', _('Editor size'), "text", "3", ''),
     ]
-    
-    user_form_defaults = { # key: default - do NOT remove keys from here!
+
+    user_form_defaults = {# key: default - do NOT remove keys from here!
         'name': '',
         'aliasname': '',
         'password': '',
@@ -462,17 +462,17 @@
         'css_url': '',
         'edit_rows': "20",
     }
-    
+
     # don't let the user change those, but show them:
     #user_form_disable = ['name', 'aliasname', 'email',]
     user_form_disable = []
-    
+
     # remove those completely:
     #user_form_remove = ['password', 'password2', 'css_url', 'logout', 'create', 'account_sendmail',]
     user_form_remove = []
-    
+
     # attributes we do NOT save to the userpref file
-    user_transient_fields =  ['id', 'valid', 'may', 'auth_username', 'trusted', 'password', 'password2', 'auth_method', 'auth_attribs']
+    user_transient_fields = ['id', 'valid', 'may', 'auth_username', 'trusted', 'password', 'password2', 'auth_method', 'auth_attribs', ]
 
     user_homewiki = 'Self' # interwiki name for where user homepages are located
 
@@ -482,7 +482,7 @@
 
     xmlrpc_putpage_enabled = 0 # if 0, putpage will write to a test page only
     xmlrpc_putpage_trusted_only = 1 # if 1, you will need to be http auth authenticated
-    
+
     SecurityPolicy = None
 
     def __init__(self, siteid):
@@ -510,12 +510,12 @@
                      (e.g. ['Sample User', 'AnotherUser']).
                      Please change it in your wiki configuration and try again."""
             raise error.ConfigurationError(msg)
-        
+
         self._loadPluginModule()
 
         # Preparse user dicts
         self._fillDicts()
-        
+
         # Normalize values
         self.language_default = self.language_default.lower()
 
@@ -534,7 +534,7 @@
                 import gdchart
             except ImportError:
                 self.chart_options = None
-        
+
         # post process
         # we replace any string placeholders with config values
         # e.g u'%(page_front_page)s' % self
@@ -555,9 +555,9 @@
 
         This check is disabled by default, when enabled, it will show an
         error message with unknown names.
-        """       
+        """
         unknown = ['"%s"' % name for name in dir(self)
-                  if not name.startswith('_') and 
+                  if not name.startswith('_') and
                   not DefaultConfig.__dict__.has_key(name) and
                   not isinstance(getattr(self, name), (type(sys), type(DefaultConfig)))]
         if unknown:
@@ -591,22 +591,22 @@
 Also check your "-*- coding -*-" line at the top of your configuration
 file. It should match the actual charset of the configuration file.
 '''
-        
+
         decode_names = (
             'sitename', 'logo_string', 'navi_bar', 'page_front_page',
-            'page_category_regex', 'page_dict_regex', 
+            'page_category_regex', 'page_dict_regex',
             'page_group_regex', 'page_template_regex', 'page_license_page',
             'page_local_spelling_words', 'acl_rights_default',
             'acl_rights_before', 'acl_rights_after', 'mail_from'
             )
-        
+
         for name in decode_names:
             attr = getattr(self, name, None)
             if attr:
                 # Try to decode strings
                 if isinstance(attr, str):
                     try:
-                        setattr(self, name, unicode(attr, charset)) 
+                        setattr(self, name, unicode(attr, charset))
                     except UnicodeError:
                         raise error.ConfigurationError(message %
                                                        {'name': name})
@@ -630,7 +630,7 @@
         mode = os.F_OK | os.R_OK | os.W_OK | os.X_OK
         for attr in ('data_dir', 'data_underlay_dir'):
             path = getattr(self, attr)
-            
+
             # allow an empty underlay path or None
             if attr == 'data_underlay_dir' and not path:
                 continue
@@ -647,7 +647,7 @@
 
 It is recommended to use absolute paths and not relative paths. Check
 also the spelling of the directory name.
-''' % {'attr': attr, 'path': path,}
+''' % {'attr': attr, 'path': path, }
                 raise error.ConfigurationError(msg)
 
     def _loadPluginModule(self):
@@ -709,7 +709,7 @@
     def __getitem__(self, item):
         """ Make it possible to access a config object like a dict """
         return getattr(self, item)
-    
+
 # remove the gettext pseudo function 
 del _
 
--- a/MoinMoin/packages.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/packages.py	Sat Jul 08 21:21:36 2006 +0200
@@ -91,7 +91,7 @@
         self.themename = None
         self.ignoreExceptions = False
         self.goto = 0
-        
+
         #Satisfy pylint
         self.msg = getattr(self, "msg", "")
         self.request = getattr(self, "request", None)
@@ -119,7 +119,7 @@
         @param lines: lines to ignore
         """
         _ = self.request.getText
-        
+
         from MoinMoin.version import release
         version_int = [int(x) for x in version.split(".")]
         release = [int(x) for x in release.split(".")]
@@ -204,7 +204,7 @@
 
         self.msg += package.msg
 
-    def do_addrevision(self, filename, pagename, author=u"Scripting Subsystem", comment=u"", trivial = u"No"):
+    def do_addrevision(self, filename, pagename, author=u"Scripting Subsystem", comment=u"", trivial=u"No"):
         """ Adds a revision to a page.
 
         @param filename: name of the file in this package
@@ -250,7 +250,7 @@
         pagedir = page.getPagePath(use_underlay=1, check_create=1)
 
         revdir = os.path.join(pagedir, 'revisions')
-        cfn = os.path.join(pagedir,'current')
+        cfn = os.path.join(pagedir, 'current')
 
         revstr = '%08d' % 1
         if not os.path.exists(revdir):
@@ -428,7 +428,7 @@
 
     # Setup MoinMoin environment
     from MoinMoin.request import CLI
-    request = CLI.Request(url = 'localhost/')
+    request = CLI.Request(url='localhost/')
     request.form = request.args = request.setup_args()
 
     package = ZipPackage(request, packagefile)
@@ -445,6 +445,7 @@
             print "Installation failed."
         if package.msg:
             print package.msg
-    
+
 if __name__ == '__main__':
     main()
+
--- a/MoinMoin/userform.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/userform.py	Sat Jul 08 21:21:36 2006 +0200
@@ -55,7 +55,7 @@
     def handleData(self):
         _ = self._
         form = self.request.form
-    
+
         if form.has_key('cancel'):
             return
 
@@ -67,7 +67,7 @@
                 email = form['email'][0].lower()
             except KeyError:
                 return _("Please provide a valid email address!")
-    
+
             u = user.get_by_email_address(self.request, email)
             if u:
                 msg = u.mailAccountData()
@@ -85,7 +85,7 @@
                 theuser = self.request.get_user_from_form()
             else:
                 theuser = user.User(self.request, auth_method="request:152")
-                
+
             # Require non-empty name
             try:
                 theuser.name = form['name'][0]
@@ -109,7 +109,7 @@
 
             # try to get the password and pw repeat
             password = form.get('password', [''])[0]
-            password2 = form.get('password2',[''])[0]
+            password2 = form.get('password2', [''])[0]
 
             # Check if password is given and matches with password repeat
             if password != password2:
@@ -145,13 +145,13 @@
             theuser.save()
             if form.has_key('create_and_mail'):
                 theuser.mailAccountData()
-            
+
             result = _("User account created! You can use this account to login now...")
             if _debug:
                 result = result + util.dumpFormData(form)
             return result
-        
-        
+
+
         # Select user profile (su user) - only works with cookie auth active.
         if form.has_key('select_user'):
             if (wikiutil.checkTicket(self.request.form['ticket'][0]) and
@@ -173,7 +173,7 @@
             if self.request.request_method != 'POST':
                 return _("Use UserPreferences to change your settings or create an account.")
             theuser = self.request.get_user_from_form()
-                
+
             if not 'name' in theuser.auth_attribs:
                 # Require non-empty name
                 theuser.name = form.get('name', [theuser.name])[0]
@@ -198,7 +198,7 @@
             if not 'password' in theuser.auth_attribs:
                 # try to get the password and pw repeat
                 password = form.get('password', [''])[0]
-                password2 = form.get('password2',[''])[0]
+                password2 = form.get('password2', [''])[0]
 
                 # Check if password is given and matches with password repeat
                 if password != password2:
@@ -239,14 +239,14 @@
 
             # editor size
             theuser.edit_rows = util.web.getIntegerInput(self.request, 'edit_rows', theuser.edit_rows, 10, 60)
-                
+
             # try to get the editor
             theuser.editor_default = form.get('editor_default', [self.cfg.editor_default])[0]
             theuser.editor_ui = form.get('editor_ui', [self.cfg.editor_ui])[0]
 
             # time zone
             theuser.tz_offset = util.web.getIntegerInput(self.request, 'tz_offset', theuser.tz_offset, -84600, 84600)
-    
+
             # datetime format
             try:
                 dt_d_combined = UserSettings._date_formats.get(form['datetime_fmt'][0], '')
@@ -254,7 +254,7 @@
             except (KeyError, ValueError):
                 theuser.datetime_fmt = '' # default
                 theuser.date_fmt = '' # default
-    
+
             # try to get the (optional) theme
             theme_name = form.get('theme_name', [self.cfg.theme_default])[0]
             if theme_name != theuser.theme_name:
@@ -292,7 +292,7 @@
                 default = self.cfg.user_form_defaults[key]
                 value = form.get(key, [default])[0]
                 setattr(theuser, key, value)
-            
+
             # checkbox options
             if not newuser:
                 for key, label in self.cfg.user_checkbox_fields:
@@ -304,15 +304,15 @@
                             pass
                         else:
                             setattr(theuser, key, value)
-    
+
             # quicklinks for navibar
-            theuser.quicklinks = self.decodePageList('quicklinks')            
-            
+            theuser.quicklinks = self.decodePageList('quicklinks')
+
             # subscription for page change notification
             theuser.subscribed_pages = self.decodePageList('subscribed_pages')
-                    
+
             # save data
-            theuser.save()            
+            theuser.save()
             self.request.user = theuser
 
             result = _("User preferences saved!")
@@ -329,10 +329,10 @@
     """ User login and settings management. """
 
     _date_formats = { # datetime_fmt & date_fmt
-        'iso':  '%Y-%m-%d %H:%M:%S & %Y-%m-%d',
-        'us':   '%m/%d/%Y %I:%M:%S %p & %m/%d/%Y',
+        'iso': '%Y-%m-%d %H:%M:%S & %Y-%m-%d',
+        'us': '%m/%d/%Y %I:%M:%S %p & %m/%d/%Y',
         'euro': '%d.%m.%Y %H:%M:%S & %d.%m.%Y',
-        'rfc':  '%a %b %d %H:%M:%S %Y & %a %b %d %Y',
+        'rfc': '%a %b %d %H:%M:%S %Y & %a %b %d %Y',
     }
 
     def __init__(self, request):
@@ -363,7 +363,7 @@
                     string.zfill("%d" % (abs(offset) % 3600 / 60), 2),
                 ),
             ))
- 
+
         return util.web.makeSelection('tz_offset', options, str(tz))
 
 
@@ -393,9 +393,9 @@
         for lang in langs:
             name = lang[1]['x-language']
             options.append((lang[0], name))
-                
+
         return util.web.makeSelection('language', options, cur_lang)
-  
+
     def _user_select(self):
         options = []
         users = user.getUserList(self.request)
@@ -404,24 +404,24 @@
             options.append((name, name))
         options.sort()
 
-        size = min(5, len(options))  
+        size = min(5, len(options))
         current_user = self.request.user.name
         return util.web.makeSelection('selected_user', options, current_user, size=size)
-            
+
     def _theme_select(self):
         """ Create theme selection. """
         cur_theme = self.request.user.valid and self.request.user.theme_name or self.cfg.theme_default
         options = [("<default>", "<%s>" % self._("Default"))]
         for theme in wikiutil.getPlugins('theme', self.request.cfg):
             options.append((theme, theme))
-                
+
         return util.web.makeSelection('theme_name', options, cur_theme)
-  
+
     def _editor_default_select(self):
         """ Create editor selection. """
         editor_default = self.request.user.valid and self.request.user.editor_default or self.cfg.editor_default
         options = [("<default>", "<%s>" % self._("Default"))]
-        for editor in ['text','gui',]:
+        for editor in ['text', 'gui', ]:
             options.append((editor, editor))
         return util.web.makeSelection('editor_default', options, editor_default)
 
@@ -433,7 +433,7 @@
                    ("freechoice", self._("free choice")),
                   ]
         return util.web.makeSelection('editor_ui', options, editor_ui)
-                
+
     def make_form(self):
         """ Create the FORM, and the TABLE with the input fields
         """
@@ -478,7 +478,7 @@
                      ' ',
                  ])
             self.make_row('', button_cell)
-            
+
         if self.request.user.valid and not create_only:
             buttons = [('save', _('Save')), ('cancel', _('Cancel')), ]
             uf_remove = self.cfg.user_form_remove
@@ -494,11 +494,11 @@
                 if not key in uf_remove:
                     if key in uf_disable:
                         self.make_row(_(label),
-                                  [ html.INPUT(type=type, size=length, name=key, disabled="disabled",
-                                    value=getattr(self.request.user, key)), ' ', _(textafter), ])
+                                  [html.INPUT(type=type, size=length, name=key, disabled="disabled",
+                                   value=getattr(self.request.user, key)), ' ', _(textafter), ])
                     else:
                         self.make_row(_(label),
-                                  [ html.INPUT(type=type, size=length, name=key, value=getattr(self.request.user, key)), ' ', _(textafter), ])
+                                  [html.INPUT(type=type, size=length, name=key, value=getattr(self.request.user, key)), ' ', _(textafter), ])
 
             if not self.cfg.theme_force and not "theme_name" in self.cfg.user_form_remove:
                 self.make_row(_('Preferred theme'), [self._theme_select()])
@@ -524,7 +524,7 @@
 
             if not "language" in self.cfg.user_form_remove:
                 self.make_row(_('Preferred language'), [self._lang_select()])
-            
+
             # boolean user options
             bool_options = []
             checkbox_fields = self.cfg.user_checkbox_fields
@@ -560,7 +560,7 @@
                             _("This list does not work, unless you have"
                               " entered a valid email address!")
                         )]
-                
+
                 self.make_row(
                     html.Raw(_('Subscribed wiki pages (one regex per line)')),
                     [html.TEXTAREA(name="subscribed_pages", rows="6", cols="50").append(
@@ -580,9 +580,9 @@
             for key, label, type, length, textafter in self.cfg.user_form_fields:
                 if key in ('name', 'password', 'password2', 'email'):
                     self.make_row(_(label),
-                              [ html.INPUT(type=type, size=length, name=key,
-                                           value=''),
-                                ' ', _(textafter), ])
+                              [html.INPUT(type=type, size=length, name=key,
+                                          value=''),
+                               ' ', _(textafter), ])
 
         if self.cfg.mail_enabled:
             buttons.append(("account_sendmail", _('Mail me my account data')))
@@ -711,10 +711,10 @@
              request.formatter.text(account.email) +
              request.formatter.url(0)),
             request.page.link_to(request, text=_('Mail me my account data'),
-                                 querystr= {"action":"userform",
-                                            "email": account.email,  
-                                            "account_sendmail": "1",
-                                            "sysadm": "users",},
+                                 querystr={"action":"userform",
+                                           "email": account.email,
+                                           "account_sendmail": "1",
+                                           "sysadm": "users", },
                                  rel='nofollow')
         ))
 
--- a/MoinMoin/version.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/version.py	Sat Jul 08 21:21:36 2006 +0200
@@ -14,7 +14,7 @@
     patchlevel = 'release'
 
 project = "MoinMoin"
-release  = '1.6.0alpha'
+release = '1.6.0alpha'
 revision = patchlevel
 
 def update():
--- a/MoinMoin/wikidicts.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/wikidicts.py	Sat Jul 08 21:21:36 2006 +0200
@@ -20,14 +20,14 @@
 
 # Set pickle protocol, see http://docs.python.org/lib/node64.html
 PICKLE_PROTOCOL = pickle.HIGHEST_PROTOCOL
- 
+
 from MoinMoin import config, caching, wikiutil, Page, logfile
 from MoinMoin.logfile.editlog import EditLog
 
 # Version of the internal data structure which is pickled
 # Please increment if you have changed the structure
 DICTS_PICKLE_VERSION = 4
-    
+
 
 class DictBase:
     """ Base class for wiki dicts
@@ -36,7 +36,7 @@
     """
     # Regular expression used to parse text - sub class should override this
     regex = ''
-    
+
     def __init__(self, request, name):
         """ Initialize, starting from <nothing>.
 
@@ -64,16 +64,16 @@
         return self._dict.has_key(key)
 
     def get(self, key, default):
-        return self._dict.get(key,default)
+        return self._dict.get(key, default)
 
     def __getitem__(self, key):
         return self._dict[key]
-    
+
     def __repr__(self):
         return "<DictBase name=%r items=%r>" % (self.name, self._dict.items())
 
 class Dict(DictBase):
-    ''' Mapping of keys to values in a wiki page
+    """ Mapping of keys to values in a wiki page
 
        How a Dict definition page should look like:
 
@@ -84,7 +84,7 @@
         ...
         keyn:: ....
        any text ignored      
-    '''
+    """
     # Key:: Value - ignore all but key:: value pairs, strip whitespace
     regex = r'^ (?P<key>.+?):: (?P<val>.*?) *$'
 
@@ -102,7 +102,7 @@
         return "<Dict name=%r items=%r>" % (self.name, self._dict.items())
 
 class Group(DictBase):
-    ''' Group of users, of pages, of whatever
+    """ Group of users, of pages, of whatever
 
     How a Group definition page should look like:
 
@@ -116,7 +116,7 @@
 
     if there are any free links using ["free link"] notation, the markup
     is stripped from the member 
-    '''
+    """
     # * Member - ignore all but first level list items, strip whitespace
     # Strip free links markup if exists
     regex = r'^ \* +(?:\[\")?(?P<member>.+?)(?:\"\])? *$'
@@ -176,7 +176,7 @@
             # Add member and its children
             members[member] = 1
             if groupdict.hasgroup(member):
-                members.update(self._expandgroup(groupdict, member))            
+                members.update(self._expandgroup(groupdict, member))
         return members
 
     def expandgroups(self, groupdict):
@@ -283,7 +283,7 @@
 
     def addgroup(self, request, groupname):
         """add a new group (will be read from the wiki page)"""
-        grp =  Group(request, groupname)
+        grp = Group(request, groupname)
         self.dictdict[groupname] = grp
         self.groupdict[groupname] = grp
 
@@ -320,7 +320,7 @@
                 cache = caching.CacheEntry(request, arena, key, scope='wiki')
                 data = pickle.loads(cache.content())
                 self.__dict__.update(data)
-                
+
                 # invalidate the cache if the pickle version changed
                 if self.picklever != DICTS_PICKLE_VERSION:
                     self.reset()
@@ -382,7 +382,7 @@
                         self.addgroup(request, pagename)
                     dump = 1
             self.pageupdate_timestamp = now
-            
+
             if not self.base_timestamp:
                 self.base_timestamp = int(time.time())
 
@@ -394,7 +394,7 @@
             "groupdict": self.groupdict,
             "picklever": self.picklever
         }
-        
+
         if dump:
             # copy unexpanded groups to self.dictdict
             for name, grp in self.groupdict.items():
@@ -405,8 +405,7 @@
 
             cache = caching.CacheEntry(request, arena, key, scope='wiki')
             cache.update(pickle.dumps(data, PICKLE_PROTOCOL))
-            
+
         # remember it (persistent environments)
         self.cfg.DICTS_DATA = data
 
-
--- a/MoinMoin/wikiutil.py	Sat Jul 08 20:42:32 2006 +0200
+++ b/MoinMoin/wikiutil.py	Sat Jul 08 21:21:36 2006 +0200
@@ -5,7 +5,7 @@
     @copyright: 2000 - 2004 by Jürgen Hermann <jh@web.de>
     @license: GNU GPL, see COPYING for details.
 """
-    
+
 import os, re, urllib, cgi
 import codecs, types
 
@@ -15,7 +15,7 @@
 
 # Exceptions
 class InvalidFileNameError(Exception):
-    """ Called when we find an invalid file name """ 
+    """ Called when we find an invalid file name """
     pass
 
 # constants for page names
@@ -47,7 +47,7 @@
             return unicode(text, cur_charset, 'replace')
         except LookupError:
             return unicode(text, 'iso-8859-1', 'replace')
-    
+
 def decodeUnknownInput(text):
     """ Decode unknown input, like text attachments
 
@@ -66,7 +66,7 @@
     # Shortcut for unicode input
     if isinstance(text, unicode):
         return text
-    
+
     try:
         return unicode(text, 'utf-8')
     except UnicodeError:
@@ -76,7 +76,7 @@
             except UnicodeError:
                 pass
         return unicode(text, 'iso-8859-1', 'replace')
-        
+
 
 def decodeUserInput(s, charsets=[config.charset]):
     """
@@ -299,21 +299,21 @@
     @return: quoted name, safe for any file system
     """
     filename = wikiname.encode(charset)
-    
-    quoted = []    
+
+    quoted = []
     location = 0
     for needle in UNSAFE.finditer(filename):
         # append leading safe stuff
         quoted.append(filename[location:needle.start()])
-        location = needle.end()                    
+        location = needle.end()
         # Quote and append unsafe stuff           
         quoted.append('(')
         for character in needle.group():
             quoted.append('%02x' % ord(character))
         quoted.append(')')
-    
+
     # append rest of string
-    quoted.append(filename[location:])    
+    quoted.append(filename[location:])
     return ''.join(quoted)
 
 
@@ -342,18 +342,18 @@
     if isinstance(filename, type(u'')):
         filename = filename.encode(config.charset)
     ### Temporary fix end ###
-        
-    parts = []    
+
+    parts = []
     start = 0
-    for needle in QUOTED.finditer(filename):  
+    for needle in QUOTED.finditer(filename):
         # append leading unquoted stuff
         parts.append(filename[start:needle.start()])
-        start = needle.end()            
+        start = needle.end()
         # Append quoted stuff
-        group =  needle.group(1)
+        group = needle.group(1)
         # Filter invalid filenames
         if (len(group) % 2 != 0):
-            raise InvalidFileNameError(filename) 
+            raise InvalidFileNameError(filename)
         try:
             for i in range(0, len(group), 2):
                 byte = group[i:i+2]
@@ -362,12 +362,12 @@
         except ValueError:
             # byte not in hex, e.g 'xy'
             raise InvalidFileNameError(filename)
-    
+
     # append rest of string
     if start == 0:
         wikiname = filename
     else:
-        parts.append(filename[start:len(filename)])   
+        parts.append(filename[start:len(filename)])
         wikiname = ''.join(parts)
 
     # This looks wrong, because at this stage "()" can be both errors
@@ -376,7 +376,7 @@
     # Filter invalid filenames. Any left (xx) must be invalid
     #if '(' in wikiname or ')' in wikiname:
     #    raise InvalidFileNameError(filename)
-    
+
     wikiname = decodeUserInput(wikiname, charsets)
     return wikiname
 
@@ -432,7 +432,7 @@
                 value = int(value)
             dict.__setitem__(self, key, value)
         self.loaded = True
-    
+
     def _put_meta(self):
         """ put the meta dict into an arbitrary filename.
             does not keep or modify state, does uncached, direct disk access.
@@ -489,7 +489,7 @@
     except AttributeError:
         _interwiki_list = {}
         lines = []
- 
+
         # order is important here, the local intermap file takes
         # precedence over the shared one, and is thus read AFTER
         # the shared one
@@ -507,7 +507,7 @@
         for line in lines:
             if not line or line[0] == '#': continue
             try:
-                line = "%s %s/InterWiki" % (line, request.getScriptname()) 
+                line = "%s %s/InterWiki" % (line, request.getScriptname())
                 wikitag, urlprefix, trash = line.split(None, 2)
             except ValueError:
                 pass
@@ -523,9 +523,9 @@
 
         # save for later
         request.cfg._interwiki_list = _interwiki_list
-    
+
     return _interwiki_list
-    
+
 def split_wiki(wikiurl):
     """ Split a wiki url, e.g:
     
@@ -699,7 +699,7 @@
     @return localized page_front_page, if there is a translation
     """
     return getSysPage(request, request.cfg.page_front_page)
-    
+
 
 def getHomePage(request, username=None):
     """
@@ -818,7 +818,7 @@
 # mimetype stuff ------------------------------------------------------------
 class MimeType(object):
     """ represents a mimetype like text/plain """
-    
+
     def __init__(self, mimestr=None, filename=None):
         self.major = self.minor = None # sanitized mime type and subtype
         self.params = {} # parameters like "charset" or others
@@ -828,13 +828,13 @@
             self.parse_mimetype(mimestr)
         elif filename:
             self.parse_filename(filename)
-    
+
     def parse_filename(self, filename):
         mtype, encoding = mimetypes.guess_type(filename)
         if mtype is None:
             mtype = 'application/octet-stream'
         self.parse_mimetype(mtype)
-        
+
     def parse_mimetype(self, mimestr):
         """ take a string like used in content-type and parse it into components,
             alternatively it also can process some abbreviated string like "wiki"
@@ -857,7 +857,7 @@
         if self.params.has_key('charset'):
             self.charset = self.params['charset'].lower()
         self.sanitize()
-            
+
     def parse_format(self, format):
         """ maps from what we currently use on-page in a #format xxx processing
             instruction to a sanitized mimetype major, minor tuple.
@@ -1041,7 +1041,7 @@
     """
     # Copy names from builtin plugins - so we dont destroy the value
     all_plugins = builtinPlugins(kind)[:]
-    
+
     # Add extension plugins without duplicates
     for plugin in wikiPlugins(kind, cfg):
         if plugin not in all_plugins:
@@ -1083,7 +1083,7 @@
                     etd = Parser
         cfg._EXT_TO_PARSER = etp
         cfg._EXT_TO_PARSER_DEFAULT = etd
-        
+
     return cfg._EXT_TO_PARSER.get(extension, cfg._EXT_TO_PARSER_DEFAULT)
 
 
@@ -1233,11 +1233,11 @@
         parameter_list = [None] * len(self.param_list)
         parameter_dict = {}
         check_list = [0] * len(self.param_list)
-            
+
         i = 0
         start = 0
         named = False
-        while start<len(input):
+        while start < len(input):
             match = re.match(self.param_re, input[start:])
             if not match: raise ValueError, "Misformatted value"
             start += match.end()
@@ -1259,7 +1259,7 @@
 
             parameter_list.append(value)
             if match.group("name"):
-                if not self.param_dict.has_key( match.group("name")):
+                if not self.param_dict.has_key(match.group("name")):
                     raise ValueError, "Unknown parameter name '%s'" % match.group("name")
                 nr = self.param_dict[match.group("name")]
                 if check_list[nr]:
@@ -1277,7 +1277,6 @@
             # check type
             #if not type in self.param_list[nr]:
 
-                
             i += 1
         return parameter_list, parameter_dict
 
@@ -1285,9 +1284,9 @@
     def _check_type(value, type, format):
         if type == 'n' and 's' in format: # n as s
             return value
-        
+
         if type in format: return value # x -> x
-        
+
         if type == 'i':
             if 'f' in format: return float(value) # i -> f
             elif 'b' in format: return value # i -> b
@@ -1299,7 +1298,7 @@
 
 
         if 's' in format: # * -> s
-            return str(value) 
+            return str(value)
         else:
             pass # XXX error
 
@@ -1425,14 +1424,14 @@
         text = params # default
     if formatter:
         url = "%s/%s" % (request.getScriptname(), params)
-        if on != None:
+        if on is not None:
             return formatter.url(on, url, css_class, **kw)
         return (formatter.url(1, url, css_class, **kw) +
                 formatter.rawHTML(text) +
                 formatter.url(0))
-    if on != None and not on:
+    if on is not None and not on:
         return '</a>'
-    
+
     attrs = ''
     if css_class:
         attrs += ' class="%s"' % css_class
@@ -1457,14 +1456,14 @@
     @rtype: list
     @return: lines like diff tool does output.
     """
-    false = lambda s: None 
+    false = lambda s: None
     if kw.get('ignorews', 0):
         d = difflib.Differ(false)
     else:
         d = difflib.Differ(false, false)
 
-    lines = list(d.compare(oldlines,newlines))
- 
+    lines = list(d.compare(oldlines, newlines))
+
     # return empty list if there were no changes
     changed = 0
     for l in lines:
@@ -1475,7 +1474,7 @@
 
     if not "we want the unchanged lines, too":
         if "no questionmark lines":
-            lines = filter(lambda line : line[0]!='?', lines)
+            lines = filter(lambda line: line[0] != '?', lines)
         return lines
 
 
@@ -1504,7 +1503,7 @@
                 count = 0
             else:
                 count = 0
-                i = i + 1                            
+                i += 1
             if marker == '-': lcount_old = lcount_old + 1
             else: lcount_new = lcount_new + 1
         elif marker == '?':
@@ -1513,7 +1512,7 @@
     # remove unchanged lines a the end
     if count > 3:
         lines[-count+3:] = []
-    
+
     return lines
 
 
@@ -1532,16 +1531,16 @@
     from MoinMoin.Page import Page
     lines1 = Page(request, pagename1, rev=rev1).getlines()
     lines2 = Page(request, pagename2, rev=rev2).getlines()
-    
+
     lines = linediff(lines1, lines2, **kw)
     return lines
- 
+
 
 ########################################################################
 ### Tickets - used by RenamePage and DeletePage
 ########################################################################
 
-def createTicket(tm = None):
+def createTicket(tm=None):
     """Create a ticket using a site-specific secret (the config)"""
     import sha, time, types
     ticket = tm or "%010x" % time.time()