[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-08-03 Thread noreply

revno: 986
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Fri 2007-08-03 17:46:05 -0700
message:
  Backported dumpdb changes from the 3.0 branch to allow dumping of marshals.
  This has been broken since 2.1.5!
modified:
  bin/dumpdb

=== modified file 'bin/dumpdb'
--- a/bin/dumpdb2005-08-27 01:40:17 +
+++ b/bin/dumpdb2007-08-04 00:46:05 +
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! /usr/bin/python
 #
 # Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
 #
@@ -45,16 +45,15 @@
 -- or if the file ends in neither suffix -- use the -p or -m flags.
 
 
-import os
 import sys
 import getopt
 import pprint
-from cPickle import load
+import cPickle
+import marshal
 from types import StringType
 
 import paths
 # Import this /after/ paths so that the sys.path is properly hacked
-from email.Generator import Generator
 from Mailman.i18n import _
 
 PROGRAM = sys.argv[0]
@@ -121,37 +120,35 @@
 # Handle dbs
 pp = pprint.PrettyPrinter(indent=4)
 if filetype == 1:
-# BAW: this probably doesn't work if there are mixed types of .db
-# files (i.e. some marshals, some bdbs).
-d = DumperSwitchboard().read(filename)
+load = marshal.load
+typename = 'marshal'
+else:
+load = cPickle.load
+typename = 'pickle'
+fp = open(filename)
+m = []
+try:
+cnt = 1
 if doprint:
-pp.pprint(d)
-return d
-else:
-fp = open(filename)
-m = []
-try:
-cnt = 1
+print _('[- start %(typename)s file -]')
+while True:
+try:
+obj = load(fp)
+except EOFError:
+if doprint:
+print _('[- end %(typename)s file -]')
+break
 if doprint:
-print _('[- start pickle file -]')
-while True:
-try:
-obj = load(fp)
-except EOFError:
-if doprint:
-print _('[- end pickle file -]')
-break
-if doprint:
-print _('- start object %(cnt)s -')
-if isinstance(obj, StringType):
-print obj
-else:
-pp.pprint(obj)
-cnt += 1
-m.append(obj)
-finally:
-fp.close()
-return m
+print _('- start object %(cnt)s -')
+if isinstance(obj, StringType):
+print obj
+else:
+pp.pprint(obj)
+cnt += 1
+m.append(obj)
+finally:
+fp.close()
+return m
 
 
 



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-08-03 Thread noreply

revno: 987
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Fri 2007-08-03 18:09:33 -0700
message:
  Ooops! The previous rev copied a configured file by mistake. Fixed.
modified:
  bin/dumpdb

=== modified file 'bin/dumpdb'
--- a/bin/dumpdb2007-08-04 00:46:05 +
+++ b/bin/dumpdb2007-08-04 01:09:33 +
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! @PYTHON@
 #
 # Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
 #



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-08-03 Thread noreply

revno: 988
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Fri 2007-08-03 18:16:56 -0700
message:
  Updated copyright year.
modified:
  bin/dumpdb

=== modified file 'bin/dumpdb'
--- a/bin/dumpdb2007-08-04 01:09:33 +
+++ b/bin/dumpdb2007-08-04 01:16:56 +
@@ -1,6 +1,6 @@
 #! @PYTHON@
 #
-# Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2007 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



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-07-17 Thread noreply

revno: 985
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Tue 2007-07-17 10:59:14 -0700
message:
  Detect 'who' with 1 or 2 arguments as administrivia.
modified:
  Mailman/Utils.py

=== modified file 'Mailman/Utils.py'
--- a/Mailman/Utils.py  2006-08-30 14:54:22 +
+++ b/Mailman/Utils.py  2007-07-17 17:59:14 +
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2007 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
@@ -574,7 +574,7 @@
 'set': (3, 3),
 'subscribe':   (0, 3),
 'unsubscribe': (0, 1),
-'who': (0, 0),
+'who': (0, 2),
 }
 
 # Given a Message.Message object, test for administrivia (eg subscribe,



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-06-29 Thread noreply

revno: 984
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Fri 2007-06-29 14:24:32 -0700
message:
  There is a bug in email 2.5.8 and possibly others, but not in 4.0.1 or
  4.0.2 that causes email.Utils.getaddresses() to return a spurious (name,
  address) tuple if the supplied argument is multi-line.  The actual bug is
  in email.Utils.parseaddr(), but the manifestation in Message.py is in
  the use of getaddresses() in get_sender() and get_senders().
  This fix works around the bug by passing the header field values through
  Mailman.Utils.oneline().
modified:
  Mailman/Message.py

=== modified file 'Mailman/Message.py'
--- a/Mailman/Message.py2006-03-06 18:21:52 +
+++ b/Mailman/Message.py2007-06-29 21:24:32 +
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2007 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
@@ -127,6 +127,10 @@
 fieldval = self[h]
 if not fieldval:
 continue
+# Work around bug in email 2.5.8 (and ?) involving getaddresses()
+# from multi-line header values.  Note that cset='us-ascii' is OK
+# since the address itself can't be RFC 2047 encoded.
+fieldval = Utils.oneline(fieldval, 'us-ascii')
 addrs = email.Utils.getaddresses([fieldval])
 try:
 realname, address = addrs[0]
@@ -180,6 +184,10 @@
 else:
 fieldvals = self.get_all(h)
 if fieldvals:
+# See comment above in get_sender() regarding
+# getaddresses() and multi-line headers
+fieldvals = [Utils.oneline(fv, 'us-ascii')
+ for fv in fieldvals]
 pairs.extend(email.Utils.getaddresses(fieldvals))
 authors = []
 for pair in pairs:



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-06-28 Thread noreply

revno: 983
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Thu 2007-06-28 12:20:50 -0700
message:
  Cleaned up a couple of style issues.  No actual code changes.
modified:
  bin/check_perms

=== modified file 'bin/check_perms'
--- a/bin/check_perms   2007-06-28 17:26:13 +
+++ b/bin/check_perms   2007-06-28 19:20:50 +
@@ -135,12 +135,13 @@
 # 'group' permissions are checked here.  Their 'other' permissions
 # aren't checked.
 private = mm_cfg.PRIVATE_ARCHIVE_FILE_DIR
-if path == private or \
-  (os.path.commonprefix((path, private)) == private
-   and os.path.split(path)[1] == 'database'):
+if path == private or (
+os.path.commonprefix((path, private)) == private
+and os.path.split(path)[1] == 'database'):
+# then...
 targetperms = PRIVATEPERMS
-elif os.path.commonprefix((path, mm_cfg.QUEUE_DIR)) \
-  == mm_cfg.QUEUE_DIR:
+elif (os.path.commonprefix((path, mm_cfg.QUEUE_DIR))
+  == mm_cfg.QUEUE_DIR):
 targetperms = QFILEPERMS
 else:
 targetperms = DIRPERMS



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-06-22 Thread noreply

revno: 979
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Fri 2007-06-22 08:16:40 -0400
message:
  testing bzr commit messages
added:
  test.txt

=== added file 'test.txt'
--- a/test.txt  1970-01-01 00:00:00 +
+++ b/test.txt  2007-06-22 12:16:40 +
@@ -0,0 +1,1 @@
+Please ignore me; I'm just testing bzr commits



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-06-22 Thread noreply

revno: 980
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Fri 2007-06-22 08:34:40 -0400
message:
  remove test file
removed:
  test.txt

=== removed file 'test.txt'
--- a/test.txt  2007-06-22 12:16:40 +
+++ b/test.txt  1970-01-01 00:00:00 +
@@ -1,1 +0,0 @@
-Please ignore me; I'm just testing bzr commits



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org