changeset 3989:dd7446b5e95c

merge with recent 1.8 main branch
author Byeongweon [tasyblue@gmail.com]
date Wed, 30 Jul 2008 20:14:07 +0900
parents be43e3973baa (current diff) b9deb538ff6c (diff)
children 645d031f4eab
files
diffstat 12 files changed, 25 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/ldap_testbase.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/_tests/ldap_testbase.py	Wed Jul 30 20:14:07 2008 +0900
@@ -32,6 +32,8 @@
 
     # /etc/init.d/apparmor stop
 
+    Requires Python 2.4 (for subprocess module).
+
     @copyright: 2008 by Thomas Waldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/action/AttachFile.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/action/AttachFile.py	Wed Jul 30 20:14:07 2008 +0900
@@ -1107,7 +1107,7 @@
 
         browser = DataBrowserWidget(request)
         browser.setData(data)
-        return browser.toHTML()
+        return browser.render()
 
     return ''
 
--- a/MoinMoin/action/Despam.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/action/Despam.py	Wed Jul 30 20:14:07 2008 +0900
@@ -71,7 +71,7 @@
 
     table = DataBrowserWidget(request)
     table.setData(dataset)
-    table.render()
+    return table.render()
 
 class tmp:
     pass
@@ -197,7 +197,7 @@
     elif editor:
         show_pages(request, pagename, editor, timestamp)
     else:
-        show_editors(request, pagename, timestamp)
+        request.write(show_editors(request, pagename, timestamp))
 
     # End content and send footer
     request.write(request.formatter.endContent())
--- a/MoinMoin/action/info.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/action/info.py	Wed Jul 30 20:14:07 2008 +0900
@@ -176,7 +176,7 @@
 
         div = html.DIV(id="page-history")
         div.append(html.INPUT(type="hidden", name="action", value="diff"))
-        div.append(history_table.toHTML())
+        div.append(history_table.render())
 
         form = html.FORM(method="GET", action="")
         form.append(div)
--- a/MoinMoin/auth/smb_mount.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/auth/smb_mount.py	Wed Jul 30 20:14:07 2008 +0900
@@ -6,6 +6,8 @@
     authentication at the SMB server). This can be used if you need access
     to files on some share via the wiki, but needs more code to be useful.
 
+    Note: requires Python 2.4 (for subprocess module)
+
     @copyright: 2006-2008 MoinMoin:ThomasWaldmann
                 2007 MoinMoin:JohannesBerg
     @license: GNU GPL, see COPYING for details.
--- a/MoinMoin/macro/ShowSmileys.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/macro/ShowSmileys.py	Wed Jul 30 20:14:07 2008 +0900
@@ -49,7 +49,7 @@
     if data:
         browser = DataBrowserWidget(macro.request)
         browser.setData(data)
-        return browser.toHTML()
+        return browser.render()
 
     return ''
 
--- a/MoinMoin/script/maint/mkpagepacks.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/script/maint/mkpagepacks.py	Wed Jul 30 20:14:07 2008 +0900
@@ -9,9 +9,9 @@
 
 import os
 import zipfile
-from sets import Set
 from datetime import datetime
 
+from MoinMoin.support.python_compatibility import set
 from MoinMoin import wikidicts, wikiutil
 from MoinMoin.Page import Page
 from MoinMoin.packages import packLine, MOIN_PACKAGE_FILE
@@ -49,7 +49,7 @@
         request = self.request
         pageSets = {}
 
-        allPages = Set(request.rootpage.getPageList())
+        allPages = set(request.rootpage.getPageList())
 
         systemPages = wikidicts.Group(request, "SystemPagesGroup").members()
 
@@ -58,20 +58,20 @@
                 #print x + " -> " + repr(wikidicts.Group(request, x).members())
                 self.gd.addgroup(request, pagename)
 
-        langPages = Set()
+        langPages = set()
         for name, group in self.gd.dictdict.items():
-            groupPages = Set(group.members() + [name])
+            groupPages = set(group.members() + [name])
             name = name.replace("SystemPagesIn", "").replace("Group", "")
             pageSets[name] = groupPages
             langPages |= groupPages
 
-        specialPages = Set(["SystemPagesGroup"])
+        specialPages = set(["SystemPagesGroup"])
 
         masterNonSystemPages = allPages - langPages - specialPages
 
-        moinI18nPages = Set([x for x in masterNonSystemPages if x.startswith("MoinI18n")])
+        moinI18nPages = set([x for x in masterNonSystemPages if x.startswith("MoinI18n")])
 
-        nodistPages = moinI18nPages | Set(["InterWikiMap", ])
+        nodistPages = moinI18nPages | set(["InterWikiMap", ])
 
         extraPages = masterNonSystemPages - nodistPages
 
--- a/MoinMoin/stats/hitcounts.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/stats/hitcounts.py	Wed Jul 30 20:14:07 2008 +0900
@@ -189,7 +189,7 @@
 
     table = DataBrowserWidget(request)
     table.setData(hits)
-    return table.toHTML()
+    return table.render()
 
 
 def draw(pagename, request):
--- a/MoinMoin/stats/languages.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/stats/languages.py	Wed Jul 30 20:14:07 2008 +0900
@@ -87,5 +87,5 @@
 
     table = DataBrowserWidget(request)
     table.setData(languages)
-    return table.toHTML()
+    return table.render()
 
--- a/MoinMoin/stats/useragents.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/stats/useragents.py	Wed Jul 30 20:14:07 2008 +0900
@@ -116,7 +116,7 @@
 
     table = DataBrowserWidget(request)
     table.setData(agents)
-    return table.toHTML()
+    return table.render()
 
 def draw(pagename, request):
     import shutil, cStringIO
--- a/MoinMoin/userform/admin.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/userform/admin.py	Wed Jul 30 20:14:07 2008 +0900
@@ -97,7 +97,7 @@
 
         browser = DataBrowserWidget(request)
         browser.setData(data)
-        return browser.toHTML()
+        return browser.render()
 
     # No data
     return ''
--- a/MoinMoin/widget/browser.py	Wed Jul 30 19:54:07 2008 +0900
+++ b/MoinMoin/widget/browser.py	Wed Jul 30 20:14:07 2008 +0900
@@ -93,8 +93,8 @@
         common[2] = self._makeoption(self._notempty, value == self.__notempty, self.__notempty)
         return '\n'.join(common + result)
 
-    def format(self):
-        fmt = self.request.formatter
+    def _format(self, formatter=None):
+        fmt = formatter or self.request.formatter
 
         result = []
         result.append(fmt.rawHTML('<form action="%s/%s" method="GET" name="%sform">' % (self.request.getScriptname(), wikiutil.quoteWikinameURL(self.request.page.page_name), self.data_id)))
@@ -187,8 +187,8 @@
         result.append(fmt.rawHTML('</form>'))
         return ''.join(result)
 
-    toHTML = format # old name of "format" function DEPRECATED, will be removed in 1.7
+    format = _format # DEPRECATED, use render()
 
-    def render(self):
-        self.request.write(self.format())
+    render = _format # Note: in moin <= 1.7.1 render() used request.write(), this was wrong!
+                     # Now it just returns the result, as the other widgets do.