Re: [Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1]

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 4, 2007, at 9:46 PM, noreply@launchpad.net wrote:
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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw 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. - -- Mark Sapiro <msapiro@value.net> 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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 18, 2007, at 10:38 PM, Mark Sapiro wrote:
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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw 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. === 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 <msapiro@value.net> 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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Nov 19, 2007, at 12:14 PM, Mark Sapiro wrote:
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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Barry Warsaw 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).
Mark Sapiro <mark@msapiro.net> 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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Nov 26, 2007, at 5:02 PM, Mark Sapiro wrote:
Awesome, thanks!
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin)
iD8DBQFHS5gA2YZpQepbvXERAmpkAKCC0OLVQg2/0/SVUlNLmIcWiMh+QQCeJlQS Z82hlRrJp5s5z9QG9eyJ3yw= =Bray -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw 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. - -- Mark Sapiro <msapiro@value.net> 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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 18, 2007, at 10:38 PM, Mark Sapiro wrote:
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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw 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. === 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 <msapiro@value.net> 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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Nov 19, 2007, at 12:14 PM, Mark Sapiro wrote:
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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Barry Warsaw 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).
Mark Sapiro <mark@msapiro.net> 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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Nov 26, 2007, at 5:02 PM, Mark Sapiro wrote:
Awesome, thanks!
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin)
iD8DBQFHS5gA2YZpQepbvXERAmpkAKCC0OLVQg2/0/SVUlNLmIcWiMh+QQCeJlQS Z82hlRrJp5s5z9QG9eyJ3yw= =Bray -----END PGP SIGNATURE-----
participants (3)
-
Barry Warsaw
-
Mark Sapiro
-
Mark Sapiro