[Mailman-Developers] ANNOUNCE Mailman 2.0.4

Barry A. Warsaw barry@digicool.com
Wed, 18 Apr 2001 15:12:53 -0400


--hVjg+bsTAg
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit


Folks,

I've just released Mailman 2.0.4 which is simply a patch release so
that Mailman works better with Python 2.1.  Mailman 2.0.3 had a few
constructs which caused warnings when run with Python 2.1.  The
unfortunate part is that those warnings could occur in the qrunner
process which tended to cause cron to bombard the system
administrators with email.  If you upgrade your Python to 2.1, you
should definitely upgrade to Mailman 2.0.4, otherwise consider it
optional.

As usual, I'm releasing this as both a complete tarball and as a patch
against Mailman 2.0.3.  You /must/ update your source to 2.0.3 before
applying the 2.0.4 patch.  Since the patch is small, I'm including it
in this message.  To apply, cd into your 2.0.4 source tree and apply
it like so:

    % patch -p0 < mailman-2.0.3-2.0.4.txt
    
Currently both http://mailman.sourceforge.net and http://www.list.org
are updated, and I expect the gnu.org site to be updated soon as
well.  The release information on SF is at

    http://sourceforge.net/project/shownotes.php?release_id=31693

See also

    http://www.gnu.org/software/mailman
    http://www.list.org
    http://mailman.sourceforge.net

Enjoy,
-Barry

[From the NEWS file]

2.0.4 (18-Apr-2001)

    Python 2.1 compatibility release.  There were a few questionable
    constructs and uses of deprecated modules that caused annoying
    warnings when used with Python 2.1.  This release quiets those
    warnings.


--hVjg+bsTAg
Content-Type: text/plain
Content-Disposition: inline;
	filename="mailman-2.0.3-2.0.4.txt"
Content-Transfer-Encoding: 7bit

Index: NEWS
===================================================================
RCS file: /cvsroot/mailman/mailman/NEWS,v
retrieving revision 1.25.2.4
retrieving revision 1.25.2.5
diff -u -r1.25.2.4 -r1.25.2.5
--- NEWS	2001/03/12 19:32:10	1.25.2.4
+++ NEWS	2001/04/18 10:45:54	1.25.2.5
@@ -4,6 +4,13 @@
 
 Here is a history of user visible changes to Mailman.
 
+2.0.4 (18-Apr-2001)
+
+    Python 2.1 compatibility release.  There were a few questionable
+    constructs and uses of deprecated modules that caused annoying
+    warnings when used with Python 2.1.  This release quiets those
+    warnings.
+
 2.0.3 (12-Mar-2001)
 
     Bug fix release.  There was a small typo in 2.0.2 in ListAdmin.py
Index: Mailman/HTMLFormatter.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/HTMLFormatter.py,v
retrieving revision 1.50
retrieving revision 1.50.2.1
diff -u -r1.50 -r1.50.2.1
--- Mailman/HTMLFormatter.py	2000/09/09 19:13:58	1.50
+++ Mailman/HTMLFormatter.py	2001/04/18 04:33:48	1.50.2.1
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -19,14 +19,14 @@
 
 
 import os
-# XXX: should be converted to use re module
-import regsub 
 import string
-import mm_cfg
-import Utils
-from htmlformat import *
+import re
 
+from Mailman import mm_cfg
+from Mailman import Utils
+from Mailman.htmlformat import *
 
+
 
 class HTMLFormatter:
     def InitVars(self):
@@ -330,7 +330,7 @@
 
     def ParseTags(self, template, replacements):
 	text = self.SnarfHTMLTemplate(template)
-	parts = regsub.splitx(text, '</?[Mm][Mm]-[^>]*>')
+	parts = re.split('(</?[Mm][Mm]-[^>]*>)', text)
 	i = 1
 	while i < len(parts):
 	    tag = string.lower(parts[i])
Index: Mailman/Utils.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Utils.py,v
retrieving revision 1.104
retrieving revision 1.104.2.2
diff -u -r1.104 -r1.104.2.2
--- Mailman/Utils.py	2000/11/16 21:43:11	1.104
+++ Mailman/Utils.py	2001/04/18 04:23:07	1.104.2.2
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -29,8 +29,6 @@
 import re
 from UserDict import UserDict
 from types import StringType
-# XXX: obsolete, should use re module
-import regsub
 import random
 import urlparse
 
@@ -415,19 +413,8 @@
 
 
 def QuoteHyperChars(str):
-    arr = regsub.splitx(str, '[<>"&]')
-    i = 1
-    while i < len(arr):
-	if arr[i] == '<':
-	    arr[i] = '&lt;'
-	elif arr[i] == '>':
-	    arr[i] = '&gt;'
-	elif arr[i] == '"':
-	    arr[i] = '&quot;'
-	else:     #if arr[i] == '&':
-	    arr[i] = '&amp;'
-	i = i + 2
-    return string.join(arr, '')
+    from cgi import escape
+    return escape(str, quote=1)
 
 
 
Index: Mailman/Version.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Version.py,v
retrieving revision 1.20.2.3
retrieving revision 1.20.2.4
diff -u -r1.20.2.3 -r1.20.2.4
--- Mailman/Version.py	2001/03/07 23:25:41	1.20.2.3
+++ Mailman/Version.py	2001/04/18 04:43:29	1.20.2.4
@@ -15,7 +15,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 # Mailman version
-VERSION = "2.0.3"
+VERSION = "2.0.4"
 
 # And as a hex number in the manner of PY_VERSION_HEX
 ALPHA = 0xa
@@ -27,7 +27,7 @@
 
 MAJOR_REV = 2
 MINOR_REV = 0
-MICRO_REV = 3
+MICRO_REV = 4
 REL_LEVEL = FINAL
 # at most 15 beta releases!
 REL_SERIAL = 0
Index: Mailman/Bouncers/Catchall.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/Attic/Catchall.py,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- Mailman/Bouncers/Catchall.py	2000/08/07 02:34:33	1.4
+++ Mailman/Bouncers/Catchall.py	2001/04/18 04:41:47	1.4.2.1
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -18,6 +18,16 @@
 # implementation of Bouncer.ScanMessage().  We keep it because I don't feel
 # like splitting it up and porting it.  It should at the very least be ported
 # to use mimetools and re. :(
+
+# In Python 2.1, the import of regsub causes a DeprecationWarning.  This is
+# annoying so if we can import the warnings module, we turn off warnings about
+# the import of regsub.  It's not worth changing the uses of regsub to use the
+# re module because Catchall.py is going away in Mailman 2.1.
+try:
+    import warnings
+    warnings.filterwarnings('ignore', module='regsub')
+except ImportError:
+    pass
 
 import re
 import string
Index: admin/www/Makefile
===================================================================
RCS file: /cvsroot/mailman/mailman/admin/www/Makefile,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- admin/www/Makefile	2000/11/08 18:43:39	1.1
+++ admin/www/Makefile	2001/04/18 10:43:46	1.1.2.1
@@ -1,4 +1,4 @@
-HT2HTML = /home/bwarsaw/projects/ht2html/ht2html.py
+HT2HTML = $(HOME)/projects/ht2html/ht2html.py
 
 HTSTYLE = MMGenerator
 HTALLFLAGS = -f -s $(HTSTYLE)
Index: admin/www/download.ht
===================================================================
RCS file: /cvsroot/mailman/mailman/admin/www/download.ht,v
retrieving revision 1.5.2.4
retrieving revision 1.5.2.5
diff -u -r1.5.2.4 -r1.5.2.5
--- admin/www/download.ht	2001/03/12 19:33:49	1.5.2.4
+++ admin/www/download.ht	2001/04/18 10:44:14	1.5.2.5
@@ -65,9 +65,9 @@
 <h3>Downloading</h3>
 
 <p>Version
-(<!-VERSION--->2.0.3<!-VERSION--->,
+(<!-VERSION--->2.0.4<!-VERSION--->,
 released on
-<!-DATE--->Mar 12 2001<!-DATE--->)
+<!-DATE--->Apr 18 2001<!-DATE--->)
 is the current GNU release.  It is available from the following mirror sites:
 
 <ul>
@@ -98,5 +98,3 @@
 % gunzip -c mailman.tar.gz | tar xf -
 </pre>
 </blockquote>
-e>
->
Index: admin/www/download.html
===================================================================
RCS file: /cvsroot/mailman/mailman/admin/www/download.html,v
retrieving revision 1.6.2.6
retrieving revision 1.6.2.7
diff -u -r1.6.2.6 -r1.6.2.7
--- admin/www/download.html	2001/03/12 19:33:49	1.6.2.6
+++ admin/www/download.html	2001/04/18 10:44:14	1.6.2.7
@@ -1,6 +1,6 @@
 <HTML>
 <!-- THIS PAGE IS AUTOMATICALLY GENERATED.  DO NOT EDIT. -->
-<!-- Mon Mar 12 14:32:38 2001 -->
+<!-- Wed Apr 18 06:43:32 2001 -->
 <!-- USING HT2HTML 1.1 -->
 <!-- SEE http://www.wooz.org/barry/software/pyware.html -->
 <!-- User-specified headers:
@@ -237,9 +237,9 @@
 <h3>Downloading</h3>
 
 <p>Version
-(<!-VERSION--->2.0.3<!-VERSION--->,
+(<!-VERSION--->2.0.4<!-VERSION--->,
 released on
-<!-DATE--->Mar 12 2001<!-DATE--->)
+<!-DATE--->Apr 18 2001<!-DATE--->)
 is the current GNU release.  It is available from the following mirror sites:
 
 <ul>
@@ -270,8 +270,6 @@
 % gunzip -c mailman.tar.gz | tar xf -
 </pre>
 </blockquote>
-e>
->
 
 </TD><!-- end of body cell -->
 </TR><!-- end of sidebar/body row -->
Index: cron/qrunner
===================================================================
RCS file: /cvsroot/mailman/mailman/cron/qrunner,v
retrieving revision 1.18.2.2
retrieving revision 1.18.2.3
diff -u -r1.18.2.2 -r1.18.2.3
--- cron/qrunner	2001/01/03 06:42:11	1.18.2.2
+++ cron/qrunner	2001/04/18 03:58:35	1.18.2.3
@@ -166,8 +166,8 @@
 
 
 _listcache = {}
+
 def open_list(listname):
-    global _listcache
     mlist = _listcache.get(listname)
     if not mlist:
         try:
@@ -267,7 +267,6 @@
 
 
 if __name__ == '__main__':
-    global _listcache
 ##    syslog('qrunner', 'qrunner begining')
     # first, claim the queue runner lock
     lock = LockFile.LockFile(QRUNNER_LOCK_FILE,

--hVjg+bsTAg--