[spambayes-dev] RE: Version Data

Kenny Pitt kenny.pitt at gmail.com
Thu Dec 23 15:20:01 CET 2004


Tony Meyer wrote:
>> It doesn't support the
>> "1.0rc2" release candidate format, but that shouldn't take
>> more than a couple of minutes to add.
> 
> We could switch to just "c" (which is nice, since it's then 'a', 'b',
> 'c') and we'd then match the Python distribution itself.  In that
> case, this addition might even be worth submitting as a distutils
> patch.  (Although from a quick look, it's a case of adding a single
> character ('c') to a regular expression...)

Not necessary, it was a simple change to the regex to look for either the
'a' or 'b' characters or the 'rc' string.

>> For consistency, I think it would be good to provide the
>> separate components of the version in the format of the
>> sys.version_info tuple.  This could be incorporated into the
>> Version class along with the function to format the long form
>> of the version.
> 
> That should be simple, too.  It's just .version + .prerelease to get
> (eg) (1,1,0,'a',1), and then a simple conversion of 'a'->'alpha', etc.

Yep, easy enough.  My SBVersion class now stores the version in a
"version_info" field just like sys.version_info.  The nice thing about this
is that the defined strings for the release level are strictly increasing
alphabetically from earliest "alpha" prerelease up to the "final" stable
release.  This allows versions to be compared with a straight comparison of
the version_info tuples.

>> From what I understand, we're free to put any custom metadata
>> we want in the __init__.py file, so we could even include the
>> download and release notes URLs there.
> 
> There's also the 'check for new version' stuff.  I guess that could
> also move to __init__.py - I gather that just means that importing
> any of the spambayes.* modules will import that as well, right?  As
> long as it doesn't actually do any work on import, it doesn't seem
> like that would hurt. 

On further inspection, the "Download Page" value is only used from the
version.cfg, not from the local version.  The comment was that this allows
us to change the download page from the server side, which seems like a good
idea so I think we should just leave it there.

> Assuming no-one else pipes up with objections, would you like to make
> the changes, or shall I?

Almost done, so I guess I'll handle it. <wink>  I just need to figure out
what to generate in the version.cfg for the "Outlook" and "POP3 Proxy"
sections so that existing 1.0.x versions will be able to update properly
when 1.1 is released.

Speaking of upgrades:  now that we have a 1.0 "final" out there, are we only
going to notify users of new "final" releases or do we need to add a way for
them to check for new pre-release versions as well?

-- 
Kenny Pitt



More information about the spambayes-dev mailing list