[Spambayes] gratuitous changes? + bugs

Meyer, Tony T.A.Meyer at massey.ac.nz
Mon Apr 28 11:05:13 EDT 2003

> I did a cvs update today, and I clearly shouldn't have.  My 
> programs based on spambayes ceased working for a variety of reasons.

Note that I have endeavoured to post lots of notification about the
Options [proposed] changes to the list, and the convert script *should*
be able to convert any old config files.  I've tried to include as much
backward compatibility code as possible, but there are always going to
be issues when changing part of the code that's as widely used as
Options.py.  Getting buggy code is part of the joy of cvs <wink>; along
with reporting the bug and having it get fixed, of course.

> 1. OptionClass.mergefiles was renamed to OptionClass.merge_files.
>    Gratuitous change?  Or is there some deeper reason behind 
>    this.  The change was not mentioned in the cvs log, by the way.

What do you have that calls mergefiles?  None of the scripts in cvs do
(well, a search for "mergefiles" doesn't bring anything up).  It was
renamed because mergefiles is not well named - it should be MergeFiles,
mergeFiles or merge_files.  It was renamed now because there are lots of
other changes happening with Options.py, and it makes sense to fix
everything at once.  I suppose it should have been mentioned in the cvs
log, sorry, but since I couldn't find anything that called it, I didn't
rate it as worthy of specific inclusion.

> 2. Boolean values in my .ini file (or at least the verbose flag) can't
>    be parsed anymore.  The reason is, the check is_boolen is incorrect
>    for Python 2.3.  It checks that the allowed_values is a bool, but
>    actual fact it's a tuple of bools.  See the diff.

"globals":"verbose" should not be a tuple of bools, it should be a bool
- it makes no sense for it to be a tuple.  Options.py has the default as
False - a single bool.  What does your configuration file have?  This
could definitely be a bug (although it's not that likely that it's just
for 2.3) - but the bug isn't in the check, it's in reading the value.
If you can let me know the config line that's causing the problem, I'll
try and figure a fix ASAP.

> 3. My setting of basic_header_skip and safe_headers didn't work
>    anymore.  The header names now have to be separated with a single
>    space.  Why?  I propose the fix included in the diff.

Sorry, my mistake; you're absolutely correct.  I'll check in the fix for
this in a moment.

=Tony Meyer

More information about the Spambayes mailing list