[spambayes-dev] RE: [Email-SIG] Maybe a bug, maybe not

Skip Montanaro skip at pobox.com
Tue May 4 09:14:54 EDT 2004


    Tony> Skip Montanaro thinks that he had a message like this fail with
    Tony> Python 2.2.3 and email 2.5.3, but work fine with Python from CVS
    Tony> and version 2.5.5 of the email package...

    Skip> ... [I] will try to get a change checked in later this evening or
    Skip> tomorrow morning.

I added an as_string() function to mboxutils.py.  I updated sb_filter.py,
sb_bnserver.py and hammie.py to use it.  I will leave it for other authors
to decide if they need to use it as well.  In particular, Tony already has a
similar solution in place for sb_server.py and sb_imapfilter.py.  I didn't
see any reason to modify that code so soon before a release.  I just stuck
with the applications I knew would benefit.  Other candidates include
sb_mboxtrain.py and sb_pop3dnd.py.

After the release I think it would be worthwhile to consider subclassing
email.Message.Message, morphing mboxutils.as_string() into a method method,
then using it everywhere.  I doubt it will be difficult to do, but would
have touched more bits of code than I felt comfortable with just before the
release.  Longer term it looks like Barry has other robustification ideas to
implement directly in the email package.

Skip



More information about the spambayes-dev mailing list