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

Mark Sapiro msapiro at value.net
Mon Nov 19 18:14:26 CET 2007


-----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 <msapiro at 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-----


More information about the Mailman-Developers mailing list