From jeff at jab.org Sat Nov 3 22:44:19 2007 From: jeff at jab.org (Jeff Breidenbach) Date: Sat, 3 Nov 2007 14:44:19 -0700 Subject: [Mailman-Developers] Improving the archives In-Reply-To: <0673D829-3875-4CC7-9175-D234F880D874@astro.princeton.edu> References: <0673D829-3875-4CC7-9175-D234F880D874@astro.princeton.edu> Message-ID: >but if you can trust yourself to generate them, consecutive >integers provide minimal, order-preserving, perfect hashing, too! Hmm.... this sounds pretty sensible to me. Jeff From stephen at xemacs.org Sun Nov 4 01:42:47 2007 From: stephen at xemacs.org (Stephen J. Turnbull) Date: Sun, 04 Nov 2007 09:42:47 +0900 Subject: [Mailman-Developers] Improving the archives In-Reply-To: <0673D829-3875-4CC7-9175-D234F880D874@astro.princeton.edu> References: <0673D829-3875-4CC7-9175-D234F880D874@astro.princeton.edu> Message-ID: <87d4uqlu2g.fsf@uwakimon.sk.tsukuba.ac.jp> Craig Loomis writes: > Globally unique IDs, hashed IDs, etc., are very appealing from > various CS-y and techie points of view, but are simply not memorable > to humans or knowable by dumb external programs. I think as much, or > more, effort should be put into delivering a straightforwardly useable > naming scheme as goes into making an arbitrary message recoverable > from anywhere. Basically, "friendly URLs" should be a primary > requirement, not an optional afterthought for careless geeks like me > to get wrong later.... Friendly URLs *are* a primary requirement. The point is that to make them *reliable* as well, either a globally unique ID is needed, or individual site admins must suffer through hard-to-document constraints on what they can do with their archives. Note that the system you describe based on the post_id member demonstrates the value of a unique ID. "Sufficient reliability" is not a tough requirement for an individual admin to achieve, as you have demonstrated. It's much more exacting for the Mailman developers, who need to satisfy both sites with different needs *and* archivers with different features. > As an aside on other discussions, can you get away without using > Message-ID or Date? No. Not all recipients of the messages get them through the list. Once again, Mailman developers have to consider that situation, while in your situation you may not need to worry about it. From barry at list.org Sun Nov 18 19:00:48 2007 From: barry at list.org (Barry Warsaw) Date: Sun, 18 Nov 2007 13:00:48 -0500 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] In-Reply-To: <20071107020714.29820.58368.launchpad@canonical@forster.canonical.com> References: <20071107020714.29820.58368.launchpad@canonical@forster.canonical.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 6, 2007, at 9:07 PM, noreply at launchpad.net wrote: > ------------------------------------------------------------ > revno: 6573 > committer: Mark Sapiro > branch nick: 3.0 > timestamp: Tue 2007-11-06 18:03:28 -0800 > message: > - Scrubber.py > Fixed an issue where an implicit text/plain part without any > headers gets > lost. > > Moved the cleansing of the filename extension to a place where > it is > guaranteed to be a string as opposed to an empty list. > modified: > Mailman/Handlers/Scrubber.py > > === modified file 'Mailman/Handlers/Scrubber.py' > --- a/Mailman/Handlers/Scrubber.py 2007-10-31 21:38:51 +0000 > +++ b/Mailman/Handlers/Scrubber.py 2007-11-07 02:03:28 +0000 > @@ -46,7 +46,7 @@ > # Path characters for common platforms > pre = re.compile(r'[/\\:]') > # All other characters to strip out of Content-Disposition: filenames > -# (essentially anything that isn't an alphanum, dot, slash, or > underscore. > +# (essentially anything that isn't an alphanum, dot, dash, or > underscore). > sre = re.compile(r'[^-\w.]') > # Regexp to strip out leading dots > dre = re.compile(r'^\.*') > @@ -265,7 +265,7 @@ > # If the message isn't a multipart, then we'll strip it > out as an > # attachment that would have to be separately downloaded. > Pipermail > # will transform the url into a hyperlink. > - elif part and not part.is_multipart(): > + elif part._payload and not part.is_multipart(): I'm not sure it's a good idea to use this non-public attribute. 'part.get_payload()' would probably be a better test. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHQH3Q2YZpQepbvXERAh5kAJ9vkjyCoAV10aYaNEDE34i9KNKQxgCgjF3p c7yN8r7OSuvkTjVUXa75zKA= =V12k -----END PGP SIGNATURE----- From barry at list.org Sun Nov 18 19:28:26 2007 From: barry at list.org (Barry Warsaw) Date: Sun, 18 Nov 2007 13:28:26 -0500 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <20071005014611.28380.40188.launchpad@canonical@forster.canonical.com> References: <20071005014611.28380.40188.launchpad@canonical@forster.canonical.com> Message-ID: <7104340B-1E29-4C96-A6AB-3B663134A8A0@list.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 4, 2007, at 9:46 PM, noreply at launchpad.net wrote: > ------------------------------------------------------------ > revno: 992 > committer: Mark Sapiro > branch nick: 2.1 > timestamp: Thu 2007-10-04 18:35:10 -0700 > message: > /cygdrive/c/MM_bzr/log.txt > modified: > Mailman/versions.py > > === modified file 'Mailman/versions.py' > --- a/Mailman/versions.py 2005-12-30 18:50:08 +0000 > +++ b/Mailman/versions.py 2007-10-05 01:35:10 +0000 > @@ -483,10 +483,11 @@ > # blow away the original timestamp and request id. > This means the > # request will live a little longer than it possibly > should have, > # but that's no big deal. > + import email > for p in v: > author, text = p[2] > reason = p[3] > - msg = Message.OutgoingMessage(text) > + msg = email.message_from_string(text, > Message.Message) > l.HoldMessage(msg, reason) > del r[k] > elif k == 'add_member': Should the import happen at the module global level? - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHQIRK2YZpQepbvXERAjRQAJ9/yhfNVNoxMY+V3jS9p7rZka5QmQCgrNpS ZXyQ0KC915TCjkwM7ECdeOc= =M8JK -----END PGP SIGNATURE----- From msapiro at value.net Sun Nov 18 19:30:05 2007 From: msapiro at value.net (Mark Sapiro) Date: Sun, 18 Nov 2007 10:30:05 -0800 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] In-Reply-To: References: <20071107020714.29820.58368.launchpad@canonical@forster.canonical.com> Message-ID: <474084AD.9070305@value.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw wrote: > On Nov 6, 2007, at 9:07 PM, noreply at launchpad.net wrote: > >> ------------------------------------------------------------ >> revno: 6573 >> committer: Mark Sapiro >> # If the message isn't a multipart, then we'll strip it >> out as an >> # attachment that would have to be separately downloaded. >> Pipermail >> # will transform the url into a hyperlink. >> - elif part and not part.is_multipart(): >> + elif part._payload and not part.is_multipart(): > > I'm not sure it's a good idea to use this non-public attribute. > 'part.get_payload()' would probably be a better test. I think Barry is right, but I did it as I did because of a concern expressed by Tokio at . I'll gladly change it to get_payload() - -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHQIStVVuXXpU7hpMRAlVhAJ9M5OX2iT3Blt5QzQ2UPBuRY+1XUACg4rHg MZywGERykk1M7brgkGDtUcA= =bXYJ -----END PGP SIGNATURE----- From barry at list.org Sun Nov 18 19:37:53 2007 From: barry at list.org (Barry Warsaw) Date: Sun, 18 Nov 2007 13:37:53 -0500 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] In-Reply-To: <474084AD.9070305@value.net> References: <20071107020714.29820.58368.launchpad@canonical@forster.canonical.com> <474084AD.9070305@value.net> Message-ID: <9E11C301-4B42-498E-A2FE-402C70470D4E@list.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 18, 2007, at 1:30 PM, Mark Sapiro wrote: > I think Barry is right, but I did it as I did because of a concern > expressed by Tokio at > 054961.html>. > > I'll gladly change it to get_payload() Tokio has a point (and it's something I want to improve in the next version of the email package), but with decode=False, get_payload() isn't too bad. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHQIaB2YZpQepbvXERAp7rAJ47da4MPipdBcdY3N0oAB5L6AtTSgCgmQZh RwjUFOjNg/LXnSvURzoIiEo= =cQSq -----END PGP SIGNATURE----- From mandre at it.dcs.ch Sun Nov 18 15:55:05 2007 From: mandre at it.dcs.ch (Mathias Andre) Date: Sun, 18 Nov 2007 15:55:05 +0100 Subject: [Mailman-Developers] Problem with Proxying and Utils.GetRequestURI Message-ID: <20071118145505.GA27542@eso.org> Dear all, In my company we're currently running Mailman 2.1.9. The setup is as follow: We have a dedicated Mailman server list.example.com For several reason we have been asked to make use of our main web server to proxy the request to the Mailman server (this allow us to use one single certificate SSL) so on our main web server www.example.com we have the following Apache configuration: ProxyPass /lists http://list.example.com/cgi-bin/mailman/ ProxyPassReverse /lists http://list.example.com/cgi-bin/mailman/ So we can acess the Mailman web interfaces via for example: http://www.example.com/lists/listinfo/mailman This works just fine, we 'renamed' all the lists using fix_url and everything went ok, all the links are fine. Well, except for one: the ACTION= entry in all the login forms (admin, admindb...) After a bit of investigation I identified the source of the 'problem', in Mailman/Cgi/Auth.py in def loginpage(): As it's a frontpage the actionurl comes from Utils.GetRequestURI(url), which in turns uses the REQUEST_URI environment variable. In our case this variable is set to the *local* Apache path, ie the path on list.example.com instead of the path on www.example.com, so we have /cgi-bin/mailman//admin/mailman instead of: /lists/admin/mailman So the web browser then tries to send the form's data to www.example.com/cgi-bin/mailman//admin/mailman which obviously doesn't exist. We temporarily fixed our problem by forcing loginpage() to always return actionurl = url whether or not frontpage is True or not. This doesn't seem to have broken anything else but obviously I would like to find a cleaner solution. So I have a couple of questions: Are we doing something wrong in our setup? Why does Mailman GetRequestURI if frontpage is True? I hope that someone will be able to enlighten us :) Many thanks in advance for this, and for the great piece of software! Mathias Andre -- * Mathias Andre Phone : +49 (0)89 3200 6760 *E S* European Southern Observatory Fax : +49 (0)89 3200 6380 O Karl Schwarzschildstr. 2 Office 213/6 * D-85748 Garching Germany "For every problem, there is a solution that is simple, neat, and wrong." H. L. Mencken From barry at list.org Sun Nov 18 22:44:23 2007 From: barry at list.org (Barry Warsaw) Date: Sun, 18 Nov 2007 16:44:23 -0500 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <20071118214021.30727.41814.launchpad@canonical@forster.canonical.com> References: <20071118214021.30727.41814.launchpad@canonical@forster.canonical.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Mark, On Nov 18, 2007, at 4:40 PM, noreply at launchpad.net wrote: > === modified file 'Mailman/Gui/Privacy.py' > --- a/Mailman/Gui/Privacy.py 2005-12-30 18:50:08 +0000 > +++ b/Mailman/Gui/Privacy.py 2007-11-18 20:01:26 +0000 > @@ -1,17 +1,17 @@ > -# Copyright (C) 2001-2005 by the Free Software Foundation, Inc. > +# Copyright (C) 2001-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 > # as published by the Free Software Foundation; either version 2 > # of the License, or (at your option) any later version. > -# > +# > # This program is distributed in the hope that it will be useful, > # but WITHOUT ANY WARRANTY; without even the implied warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > # GNU General Public License for more details. > -# > +# > # You should have received a copy of the GNU General Public License > -# along with this program; if not, write to the Free Software > +# along with this program; if not, write to the Free Software > # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > 02110-1301, > # USA. > > @@ -59,7 +59,7 @@ > _('Confirm'), > _('Require approval'), > _('Confirm and approve')), > - 0, > + 0, > _('What steps are required for > subscription?
'), > _('''None - no verification steps (Not > Recommended )
> @@ -67,7 +67,7 @@ > Require approval - require list > administrator > Approval for subscriptions
> Confirm and approve - both confirm and > approve > - > + >

(*) when someone requests a > subscription, > Mailman sends them a notice with a unique > subscription request number that they > must reply to > @@ -88,7 +88,7 @@ > Require approval - require list > administrator > approval for subscriptions
> Confirm and approve - both confirm and > approve > - > + >

(*) when someone requests a > subscription, > Mailman sends them a notice with a unique > subscription request number that they > must reply to These changes affect all translations because they change the source string. Since translators will get the new pot file soon, this might be okay, but I just wanted to point that out. Cheers, - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHQLI32YZpQepbvXERAlbIAJ9285htmRgaa/bEhdECBJGidBXUfQCglMI5 As32OIHFWg9UvNkk/jhkKTQ= =mIJw -----END PGP SIGNATURE----- From msapiro at value.net Mon Nov 19 03:28:20 2007 From: msapiro at value.net (Mark Sapiro) Date: Sun, 18 Nov 2007 18:28:20 -0800 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: References: <20071118214021.30727.41814.launchpad@canonical@forster.canonical.com> Message-ID: <4740F4C4.2010503@value.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw wrote: > > On Nov 18, 2007, at 4:40 PM, noreply at launchpad.net wrote: > >> === modified file 'Mailman/Gui/Privacy.py' >> --- a/Mailman/Gui/Privacy.py 2005-12-30 18:50:08 +0000 >> +++ b/Mailman/Gui/Privacy.py 2007-11-18 20:01:26 +0000 >> @@ -67,7 +67,7 @@ >> Require approval - require list >> administrator >> Approval for subscriptions
>> Confirm and approve - both confirm and >> approve >> - >> + >>

(*) when someone requests a >> subscription, >> Mailman sends them a notice with a unique >> subscription request number that they >> must reply to >> @@ -88,7 +88,7 @@ >> Require approval - require list >> administrator >> approval for subscriptions
>> Confirm and approve - both confirm and >> approve >> - >> + >>

(*) when someone requests a >> subscription, >> Mailman sends them a notice with a unique >> subscription request number that they >> must reply to > > These changes affect all translations because they change the source > string. Since translators will get the new pot file soon, this might > be okay, but I just wanted to point that out. Thanks Barry, I'm trying to do too many things at once. I didn't consider the effect on the translations. I have backed out the changes that were just gratuitous trailing whitespace removal in i18n'd messages and regenerated the mailman.pot. - -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHQPTEVVuXXpU7hpMRAipDAJwNJShkw7pl3gyUdazD2uK+SHF6jQCcDVsi EJXHEzStb+LLOwExSbtDg4A= =E/PX -----END PGP SIGNATURE----- From msapiro at value.net Mon Nov 19 04:01:25 2007 From: msapiro at value.net (Mark Sapiro) Date: Sun, 18 Nov 2007 19:01:25 -0800 Subject: [Mailman-Developers] Problem with Proxying and Utils.GetRequestURI In-Reply-To: <20071118145505.GA27542@eso.org> References: <20071118145505.GA27542@eso.org> Message-ID: <4740FC85.4020206@value.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mathias Andre wrote: > > We have a dedicated Mailman server list.example.com > For several reason we have been asked to make use of our main web server to > proxy the request to the Mailman server (this allow us to use one single > certificate SSL) so on our main web server www.example.com we have the > following Apache configuration: > > ProxyPass /lists http://list.example.com/cgi-bin/mailman/ > ProxyPassReverse /lists http://list.example.com/cgi-bin/mailman/ > > So we can acess the Mailman web interfaces via for example: > http://www.example.com/lists/listinfo/mailman > > This works just fine, we 'renamed' all the lists using fix_url and everything > went ok, all the links are fine. > > > Well, except for one: the ACTION= entry in all the login forms (admin, > admindb...) > > After a bit of investigation I identified the source of the 'problem', in > Mailman/Cgi/Auth.py in def loginpage(): > > As it's a frontpage the actionurl comes from Utils.GetRequestURI(url), which > in turns uses the REQUEST_URI environment variable. Actually, that's backwards. actionurl comes from Utils.GetRequestURI(url) if frontpage is false. > In our case this variable is set to the *local* Apache path, ie the path on > list.example.com instead of the path on www.example.com, so we have > /cgi-bin/mailman//admin/mailman > instead of: > /lists/admin/mailman I think that's all the local web server can do. I don't think there's anything in the CGI environment that could get the original URI path as sent to the proxy server. > So the web browser then tries to send the form's data to > www.example.com/cgi-bin/mailman//admin/mailman which obviously doesn't exist. > > We temporarily fixed our problem by forcing loginpage() to always return > actionurl = url whether or not frontpage is True or not. > This doesn't seem to have broken anything else but obviously I would like to > find a cleaner solution. I think you'll find it breaks one thing. Namely if someone tries to go to a sub-page, e.g , without having logged in, they should be taken to that page upon posting the password. In your case, it doesn't work anyway, but in general, always setting frontpage true will cause the login page to always return to the default page. > So I have a couple of questions: > Are we doing something wrong in our setup? Why does Mailman GetRequestURI if > frontpage is True? Actually, false, but the reason is as I explain above. The only time loginpage() is called with frontpage true is in response to the logout request so you go to the default page if you (or someone else) log in again. - -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHQPyFVVuXXpU7hpMRAhzMAKC5MIUqPx9Vzf4dtF8CxvTeVL03GQCgi/jz /ZSUa896yQdE1gd+tILGfKc= =LYws -----END PGP SIGNATURE----- From msapiro at value.net Mon Nov 19 04:38:39 2007 From: msapiro at value.net (Mark Sapiro) Date: Sun, 18 Nov 2007 19:38:39 -0800 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <7104340B-1E29-4C96-A6AB-3B663134A8A0@list.org> References: <20071005014611.28380.40188.launchpad@canonical@forster.canonical.com> <7104340B-1E29-4C96-A6AB-3B663134A8A0@list.org> Message-ID: <4741053F.5050801@value.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw wrote: > On Oct 4, 2007, at 9:46 PM, noreply at launchpad.net wrote: > >> ------------------------------------------------------------ >> revno: 992 >> committer: Mark Sapiro >> branch nick: 2.1 >> timestamp: Thu 2007-10-04 18:35:10 -0700 >> message: >> /cygdrive/c/MM_bzr/log.txt >> modified: >> Mailman/versions.py > >> === modified file 'Mailman/versions.py' >> --- a/Mailman/versions.py 2005-12-30 18:50:08 +0000 >> +++ b/Mailman/versions.py 2007-10-05 01:35:10 +0000 >> @@ -483,10 +483,11 @@ >> # blow away the original timestamp and request id. >> This means the >> # request will live a little longer than it possibly >> should have, >> # but that's no big deal. >> + import email >> for p in v: >> author, text = p[2] >> reason = p[3] >> - msg = Message.OutgoingMessage(text) >> + msg = email.message_from_string(text, >> Message.Message) >> l.HoldMessage(msg, reason) >> del r[k] >> elif k == 'add_member': > > Should the import happen at the module global level? I thought about that. Our standards of course say yes, but this particular import only occurs when updating a Mailman 1.0.x list which I hope happens very infrequently. However I don't really feel strongly either way. - -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHQQU/VVuXXpU7hpMRAgKkAKDu+323UJuX81GEFrykXkh+SfxdNgCgx0Sy YtFAMJL5vdUfNV538VNl0uY= =aqO7 -----END PGP SIGNATURE----- From barry at list.org Mon Nov 19 14:06:28 2007 From: barry at list.org (Barry Warsaw) Date: Mon, 19 Nov 2007 08:06:28 -0500 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <4740F4C4.2010503@value.net> References: <20071118214021.30727.41814.launchpad@canonical@forster.canonical.com> <4740F4C4.2010503@value.net> Message-ID: <64C90A51-0533-4E43-B065-C6140AB37C46@list.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 18, 2007, at 9:28 PM, Mark Sapiro wrote: > Thanks Barry, > > I'm trying to do too many things at once. I didn't consider the effect > on the translations. I have backed out the changes that were just > gratuitous trailing whitespace removal in i18n'd messages and > regenerated the mailman.pot. You rock Mark! - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHQYpU2YZpQepbvXERAkLxAJ46JqBkXw0ZesiH1aOCN8r2PcebyQCgjUiY vr/H8IFFSBcQWS01P6fd9nI= =bJML -----END PGP SIGNATURE----- From barry at list.org Mon Nov 19 14:24:39 2007 From: barry at list.org (Barry Warsaw) Date: Mon, 19 Nov 2007 08:24:39 -0500 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <4741053F.5050801@value.net> References: <20071005014611.28380.40188.launchpad@canonical@forster.canonical.com> <7104340B-1E29-4C96-A6AB-3B663134A8A0@list.org> <4741053F.5050801@value.net> Message-ID: <57D7F97B-807F-41F7-A94B-FA88034727EC@list.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 18, 2007, at 10:38 PM, Mark Sapiro wrote: >>> === modified file 'Mailman/versions.py' >>> --- a/Mailman/versions.py 2005-12-30 18:50:08 +0000 >>> +++ b/Mailman/versions.py 2007-10-05 01:35:10 +0000 >>> @@ -483,10 +483,11 @@ >>> # blow away the original timestamp and request id. >>> This means the >>> # request will live a little longer than it possibly >>> should have, >>> # but that's no big deal. >>> + import email >>> for p in v: >>> author, text = p[2] >>> reason = p[3] >>> - msg = Message.OutgoingMessage(text) >>> + msg = email.message_from_string(text, >>> Message.Message) >>> l.HoldMessage(msg, reason) >>> del r[k] >>> elif k == 'add_member': >> >> Should the import happen at the module global level? > > > I thought about that. Our standards of course say yes, but this > particular import only occurs when updating a Mailman 1.0.x list > which I > hope happens very infrequently. However I don't really feel strongly > either way. Ultimately it's a style issue. I'm nearly positive that it will make no significant different in performance. Generally I like to have function scope imports only when necessary (e.g. to avoid circular import problems). But I'll leave it up to you to change or not. Cheers, - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHQY6X2YZpQepbvXERAlNpAJ91ZKrl0gWY5r+l0OoPhwasBY0YHACgo/38 1QGhKpAIyf8gPgY0mCJIm6o= =z8gz -----END PGP SIGNATURE----- From msapiro at value.net Mon Nov 19 18:14:26 2007 From: msapiro at value.net (Mark Sapiro) Date: Mon, 19 Nov 2007 09:14:26 -0800 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <57D7F97B-807F-41F7-A94B-FA88034727EC@list.org> References: <20071005014611.28380.40188.launchpad@canonical@forster.canonical.com> <7104340B-1E29-4C96-A6AB-3B663134A8A0@list.org> <4741053F.5050801@value.net> <57D7F97B-807F-41F7-A94B-FA88034727EC@list.org> Message-ID: <4741C472.90705@value.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw wrote: > On Nov 18, 2007, at 10:38 PM, Mark Sapiro wrote: > >> I thought about that. Our standards of course say yes, but this >> particular import only occurs when updating a Mailman 1.0.x list which I >> hope happens very infrequently. However I don't really feel strongly >> either way. > > Ultimately it's a style issue. I'm nearly positive that it will make no > significant different in performance. Generally I like to have function > scope imports only when necessary (e.g. to avoid circular import > problems). But I'll leave it up to you to change or not. I've moved the email import, and also an import of _BounceInfo. I'm ready to commit this, but I want to run it by you first to see if I'm missing anything with regard to moving the import of _BounceInfo. === modified file 'Mailman/versions.py' - --- Mailman/versions.py 2007-10-05 02:50:56 +0000 +++ Mailman/versions.py 2007-11-19 17:02:10 +0000 @@ -33,11 +33,14 @@ """ +import email + from types import ListType, StringType from Mailman import mm_cfg from Mailman import Utils from Mailman import Message +from Mailman.Bouncer import _BounceInfo from Mailman.MemberAdaptor import UNKNOWN from Mailman.Logging.Syslog import syslog @@ -419,7 +422,6 @@ # Go through all the keys in bounce_info. If the key is not a member, or # if the data is not a _BounceInfo instance, chuck the bounce info. We're # doing things differently now. - - from Mailman.Bouncer import _BounceInfo for m in mlist.bounce_info.keys(): if not mlist.isMember(m) or not isinstance(mlist.getBounceInfo(m), _BounceInfo): @@ -483,7 +485,6 @@ # blow away the original timestamp and request id. This means the # request will live a little longer than it possibly should have, # but that's no big deal. - - import email for p in v: author, text = p[2] reason = p[3] - -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHQcRxVVuXXpU7hpMRArZAAKD8R2Cif0NNC1X89rqyHn0hEjKibQCfRsSf wx9HFj66t+cnR7BtyE16s64= =C90I -----END PGP SIGNATURE----- From barry at list.org Mon Nov 19 22:26:04 2007 From: barry at list.org (Barry Warsaw) Date: Mon, 19 Nov 2007 16:26:04 -0500 Subject: [Mailman-Developers] Shameless plug Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi folks, I apologize in advance for the shameless plug. GNU Mailman is up for the 2007 Antonio Pizzigati Prize for software in the public interest. I sure would appreciate it if you take the time to vote for GNU Mailman: http://forums.pizzigatiprize.org/index.php Vote in the 'Vote' forum. Leave comments in the 'GNU Mailman' forum. Yes, you need to register with the site in order to vote. Thanks for your support! - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHQf9t2YZpQepbvXERAorYAKCXoVhrBI8eZu+uRxaYlIdyCjAj/ACglrYh RQstgR9SujgyTqsMVSh2q/s= =oIKy -----END PGP SIGNATURE----- From barry at list.org Sat Nov 24 03:30:29 2007 From: barry at list.org (Barry Warsaw) Date: Fri, 23 Nov 2007 21:30:29 -0500 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <4741C472.90705@value.net> References: <20071005014611.28380.40188.launchpad@canonical@forster.canonical.com> <7104340B-1E29-4C96-A6AB-3B663134A8A0@list.org> <4741053F.5050801@value.net> <57D7F97B-807F-41F7-A94B-FA88034727EC@list.org> <4741C472.90705@value.net> Message-ID: <318CEF25-46C1-4166-9C20-F035BA35A4FD@list.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 19, 2007, at 12:14 PM, Mark Sapiro wrote: > Barry Warsaw wrote: >> On Nov 18, 2007, at 10:38 PM, Mark Sapiro wrote: >> >>> I thought about that. Our standards of course say yes, but this >>> particular import only occurs when updating a Mailman 1.0.x list >>> which I >>> hope happens very infrequently. However I don't really feel strongly >>> either way. >> >> Ultimately it's a style issue. I'm nearly positive that it will >> make no >> significant different in performance. Generally I like to have >> function >> scope imports only when necessary (e.g. to avoid circular import >> problems). But I'll leave it up to you to change or not. > > > I've moved the email import, and also an import of _BounceInfo. I'm > ready to commit this, but I want to run it by you first to see if I'm > missing anything with regard to moving the import of _BounceInfo. Hi Mark, I think it should be fine, as long as it doesn't create a circular import. I didn't run the code, but from grepping it looks like we should be okay. The only import of Mailman.versions is at file scope afaict. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHR4zG2YZpQepbvXERAut0AJ40NPdqbfI3Z+EQsLibny4atEGjLQCgkw20 JLr8bvq5WFV/O45Uo7JoCX8= =FfSi -----END PGP SIGNATURE----- From barry at list.org Mon Nov 26 15:26:11 2007 From: barry at list.org (Barry Warsaw) Date: Mon, 26 Nov 2007 09:26:11 -0500 Subject: [Mailman-Developers] lost email Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi folks, I lost my entire raid array over the weekend. Fortunately, I was able to make a backup of most stuff on November 20th, and managed to save a few emails out of my local cache up to November 23rd (thank you, thank you, thank you Mail.app!). Depending on what upstream servers bounced or delayed, I may not have gotten anything from the 23rd until today. Everything's back up again now, but if you sent me an important email over the Thanksgiving holiday, assume I lost it and please resend! Cheers, - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHSteD2YZpQepbvXERAqtoAJ9aJPGRcQ/An5YS66sydkJp5vSj0ACfRXYE 8KPXA/n5BIyj8BcaArBuYv8= =G0GI -----END PGP SIGNATURE----- From mark at msapiro.net Mon Nov 26 23:02:33 2007 From: mark at msapiro.net (Mark Sapiro) Date: Mon, 26 Nov 2007 14:02:33 -0800 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <318CEF25-46C1-4166-9C20-F035BA35A4FD@list.org> References: <20071005014611.28380.40188.launchpad@canonical@forster.canonical.com> <7104340B-1E29-4C96-A6AB-3B663134A8A0@list.org> <4741053F.5050801@value.net> <57D7F97B-807F-41F7-A94B-FA88034727EC@list.org> <4741C472.90705@value.net> <318CEF25-46C1-4166-9C20-F035BA35A4FD@list.org> Message-ID: <474B4279.4080407@msapiro.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw wrote: > On Nov 19, 2007, at 12:14 PM, Mark Sapiro wrote: > >> I've moved the email import, and also an import of _BounceInfo. I'm >> ready to commit this, but I want to run it by you first to see if I'm >> missing anything with regard to moving the import of _BounceInfo. > > Hi Mark, > > I think it should be fine, as long as it doesn't create a circular > import. I didn't run the code, but from grepping it looks like we > should be okay. The only import of Mailman.versions is at file scope > afaict. I have now actually tested the code thanks to Tokio's sibling list patch, and it works without problems (and the move of the imports has been committed). - -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHS0J5VVuXXpU7hpMRAk+7AJsG50NFD51ekFa+/BTyHubSSofVggCeLRCW 0+C7TwOptmT/3/znMVoY/XI= =Vd32 -----END PGP SIGNATURE----- From barry at list.org Tue Nov 27 05:07:28 2007 From: barry at list.org (Barry Warsaw) Date: Mon, 26 Nov 2007 23:07:28 -0500 Subject: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] In-Reply-To: <474B4279.4080407@msapiro.net> References: <20071005014611.28380.40188.launchpad@canonical@forster.canonical.com> <7104340B-1E29-4C96-A6AB-3B663134A8A0@list.org> <4741053F.5050801@value.net> <57D7F97B-807F-41F7-A94B-FA88034727EC@list.org> <4741C472.90705@value.net> <318CEF25-46C1-4166-9C20-F035BA35A4FD@list.org> <474B4279.4080407@msapiro.net> Message-ID: <93A158DD-D846-444D-A0DA-8CFC8A2CFD86@list.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 26, 2007, at 5:02 PM, Mark Sapiro wrote: > I have now actually tested the code thanks to Tokio's sibling list > patch, and it works without problems (and the move of the imports has > been committed). Awesome, thanks! - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHS5gA2YZpQepbvXERAmpkAKCC0OLVQg2/0/SVUlNLmIcWiMh+QQCeJlQS Z82hlRrJp5s5z9QG9eyJ3yw= =Bray -----END PGP SIGNATURE-----