Update of /cvsroot/spambayes/spambayes/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1047/scripts
Modified Files:
sb_filter.py sb_imapfilter.py sb_pop3dnd.py sb_server.py
Log Message:
New version numbering scheme. All apps now use the same version number, and
the current version information is read from the __init__.py file in the
"spambayes" module.
Float version numbers are no longer used for update checks. Instead, our
standard string version number format is parsed into a tuple in the format of
the sys.version_info field. Versions can then be compared based on that
tuple.
Index: sb_filter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_filter.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** sb_filter.py 22 Nov 2004 00:13:43 -0000 1.15
--- sb_filter.py 23 Dec 2004 18:14:18 -0000 1.16
***************
*** 77,81 ****
import getopt
from spambayes import hammie, Options, mboxutils, storage
! from spambayes.Version import get_version_string
try:
--- 77,81 ----
import getopt
from spambayes import hammie, Options, mboxutils, storage
! from spambayes.Version import get_current_version
try:
***************
*** 126,131 ****
"""Print usage message and sys.exit(code)."""
# Include version info in usage
! print >> sys.stderr, get_version_string("sb_filter")
! print >> sys.stderr, " with engine %s" % get_version_string()
print >> sys.stderr
--- 126,131 ----
"""Print usage message and sys.exit(code)."""
# Include version info in usage
! v = get_current_version()
! print >> sys.stderr, v.get_long_version("SpamBayes Command Line Filter")
print >> sys.stderr
Index: sb_imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_imapfilter.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** sb_imapfilter.py 22 Dec 2004 00:27:17 -0000 1.49
--- sb_imapfilter.py 23 Dec 2004 18:14:32 -0000 1.50
***************
*** 104,108 ****
from spambayes.UserInterface import UserInterfaceServer
from spambayes.ImapUI import IMAPUserInterface
! from spambayes.Version import get_version_string
from imaplib import IMAP4
--- 104,108 ----
from spambayes.UserInterface import UserInterfaceServer
from spambayes.ImapUI import IMAPUserInterface
! from spambayes.Version import get_current_version
from imaplib import IMAP4
***************
*** 1023,1028 ****
# Let the user know what they are using...
! print get_version_string("IMAP Filter")
! print "and engine %s.\n" % (get_version_string(),)
if options["globals", "verbose"]:
--- 1023,1028 ----
# Let the user know what they are using...
! v = get_current_version();
! print "%s.\n" % (v.get_long_version("SpamBayes IMAP Filter"),)
if options["globals", "verbose"]:
Index: sb_pop3dnd.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_pop3dnd.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** sb_pop3dnd.py 22 Dec 2004 01:51:49 -0000 1.16
--- sb_pop3dnd.py 23 Dec 2004 18:14:32 -0000 1.17
***************
*** 101,105 ****
from spambayes.tokenizer import tokenize
from spambayes import FileCorpus, Dibbler
! from spambayes.Version import get_version_string
from sb_server import POP3ProxyBase, State, _addressPortStr, _recreateState
--- 101,105 ----
from spambayes.tokenizer import tokenize
from spambayes import FileCorpus, Dibbler
! from spambayes.Version import get_current_version
from sb_server import POP3ProxyBase, State, _addressPortStr, _recreateState
***************
*** 1021,1027 ****
# Let the user know what they are using...
! print get_version_string("IMAP Server")
! print get_version_string("POP3 Proxy")
! print get_version_string()
from twisted.copyright import version as twisted_version
print "Twisted version %s.\n" % (twisted_version,)
--- 1021,1026 ----
# Let the user know what they are using...
! v = get_current_version()
! print v.get_long_version()
from twisted.copyright import version as twisted_version
print "Twisted version %s.\n" % (twisted_version,)
Index: sb_server.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_server.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** sb_server.py 22 Dec 2004 01:51:49 -0000 1.37
--- sb_server.py 23 Dec 2004 18:14:32 -0000 1.38
***************
*** 119,123 ****
from spambayes.UserInterface import UserInterfaceServer
from spambayes.ProxyUI import ProxyUserInterface
! from spambayes.Version import get_version_string
--- 119,123 ----
from spambayes.UserInterface import UserInterfaceServer
from spambayes.ProxyUI import ProxyUserInterface
! from spambayes.Version import get_current_version
***************
*** 990,995 ****
# Let the user know what they are using...
! print get_version_string("POP3 Proxy")
! print "and engine %s.\n" % (get_version_string(),)
if 0 <= len(args) <= 2:
--- 990,995 ----
# Let the user know what they are using...
! v = get_current_version()
! print "%s\n" % (v.get_long_version("SpamBayes POP3 Proxy"),)
if 0 <= len(args) <= 2:
_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins