[Moin-user] Dependency on Python 2.5 in MoinMoin 1.7.2

Greg Ward gerg.ward+moin at gmail.com
Fri Oct 24 17:44:56 EDT 2008


We just ugpraded our wiki from MoinMoin 1.7.1 to 1.7.2.  In the
installation, I noticed a couple of Python syntax errors fly by:

  File "/var/share/imswiki/moin-1.7.2/lib/MoinMoin/action/serveopenid.py", line 14
    from openid.consumer.discover import (OPENID_1_0_TYPE,
  SyntaxError: invalid syntax

  File "/var/share/imswiki/moin-1.7.2/lib/jabberbot/capat.py", line 53
    ident = ('%s/%s' % (idcat, idtype) for idcat, idtype in ident)
  SyntaxError: invalid syntax

Obviously these two modules require Python 2.5.

This is on a server running Red Hat Enterprise Linux 4 and Python 2.3.4.
I thought MoinMoin still tried to support Python 2.3, or at least 2.4?

I will attach a minimal patch.

        Greg
-------------- next part --------------
changeset:   3843:ebd57f072da0
user:        Greg Ward <gerg.ward+moin at gmail.com>
date:        Fri Oct 24 17:42:29 2008 -0400
summary:     Python 2.3 compatibility fixes.

diff -r bf543d0796c8 -r ebd57f072da0 MoinMoin/action/serveopenid.py
--- a/MoinMoin/action/serveopenid.py	Sat Oct 11 22:04:06 2008 +0200
+++ b/MoinMoin/action/serveopenid.py	Fri Oct 24 17:42:29 2008 -0400
@@ -11,8 +11,8 @@
 from MoinMoin.support.python_compatibility import rsplit
 from MoinMoin.util.moinoid import MoinOpenIDStore, strbase64
 from MoinMoin import wikiutil
-from openid.consumer.discover import (OPENID_1_0_TYPE,
-    OPENID_1_1_TYPE, OPENID_2_0_TYPE, OPENID_IDP_2_0_TYPE)
+from openid.consumer.discover import OPENID_1_0_TYPE, \
+    OPENID_1_1_TYPE, OPENID_2_0_TYPE, OPENID_IDP_2_0_TYPE
 from openid import sreg
 from openid.cryptutil import randomString
 from openid.server import server
diff -r bf543d0796c8 -r ebd57f072da0 jabberbot/capat.py
--- a/jabberbot/capat.py	Sat Oct 11 22:04:06 2008 +0200
+++ b/jabberbot/capat.py	Fri Oct 24 17:42:29 2008 -0400
@@ -50,7 +50,7 @@
     ident = list(identities)
     # default sorting already considers both, category and type
     ident.sort()
-    ident = ('%s/%s' % (idcat, idtype) for idcat, idtype in ident)
+    ident = ['%s/%s' % (idcat, idtype) for idcat, idtype in ident]
 
     feat = list(features)
     # strings (byte arrays) are ordered by i;octet by default



More information about the Moin-user mailing list