[prev in list] [next in list] [prev in thread] [next in thread] 

List:       spambayes-checkins
Subject:    [Spambayes-checkins] SF.net SVN: spambayes:[3225] trunk/spambayes
From:       montanaro () users ! sourceforge ! net (montanaro at users ! sourceforge ! net)
Date:       2008-12-06 23:48:54
Message-ID: E1L96tK-00048U-Dx () 74yxhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 3225
          http://spambayes.svn.sourceforge.net/spambayes/?rev=3225&view=rev
Author:   montanaro
Date:     2008-12-06 23:48:53 +0000 (Sat, 06 Dec 2008)

Log Message:
-----------
Start requiring Python >= 2.4.  Dump the check for True, False.  Update
version tests in setup.py.  With a nod toward the future, if we are trying
to install w/ 3.0 require lockfile >= 0.6.

Modified Paths:
--------------
    trunk/spambayes/CHANGELOG.txt
    trunk/spambayes/Outlook2000/addin.py
    trunk/spambayes/Outlook2000/config.py
    trunk/spambayes/Outlook2000/dialogs/FolderSelector.py
    trunk/spambayes/Outlook2000/dialogs/async_processor.py
    trunk/spambayes/Outlook2000/dialogs/resources/rcparser.py
    trunk/spambayes/Outlook2000/filter.py
    trunk/spambayes/Outlook2000/manager.py
    trunk/spambayes/Outlook2000/msgstore.py
    trunk/spambayes/Outlook2000/train.py
    trunk/spambayes/contrib/showclues.py
    trunk/spambayes/pspam/pop.py
    trunk/spambayes/pspam/pspam/folder.py
    trunk/spambayes/pspam/pspam/profile.py
    trunk/spambayes/pspam/scoremsg.py
    trunk/spambayes/pspam/update.py
    trunk/spambayes/scripts/core_server.py
    trunk/spambayes/scripts/sb_bnserver.py
    trunk/spambayes/scripts/sb_dbexpimp.py
    trunk/spambayes/scripts/sb_filter.py
    trunk/spambayes/scripts/sb_imapfilter.py
    trunk/spambayes/scripts/sb_mailsort.py
    trunk/spambayes/scripts/sb_mboxtrain.py
    trunk/spambayes/scripts/sb_notesfilter.py
    trunk/spambayes/scripts/sb_pop3dnd.py
    trunk/spambayes/scripts/sb_server.py
    trunk/spambayes/scripts/sb_upload.py
    trunk/spambayes/scripts/sb_xmlrpcserver.py
    trunk/spambayes/setup.py
    trunk/spambayes/spambayes/CoreUI.py
    trunk/spambayes/spambayes/Corpus.py
    trunk/spambayes/spambayes/Dibbler.py
    trunk/spambayes/spambayes/Histogram.py
    trunk/spambayes/spambayes/ImapUI.py
    trunk/spambayes/spambayes/Options.py
    trunk/spambayes/spambayes/OptionsClass.py
    trunk/spambayes/spambayes/ProxyUI.py
    trunk/spambayes/spambayes/ServerUI.py
    trunk/spambayes/spambayes/Stats.py
    trunk/spambayes/spambayes/TestDriver.py
    trunk/spambayes/spambayes/TestToolsUI.py
    trunk/spambayes/spambayes/Tester.py
    trunk/spambayes/spambayes/UserInterface.py
    trunk/spambayes/spambayes/__init__.py
    trunk/spambayes/spambayes/chi2.py
    trunk/spambayes/spambayes/classifier.py
    trunk/spambayes/spambayes/compatsets.py
    trunk/spambayes/spambayes/hammie.py
    trunk/spambayes/spambayes/hammiebulk.py
    trunk/spambayes/spambayes/i18n.py
    trunk/spambayes/spambayes/message.py
    trunk/spambayes/spambayes/smtpproxy.py
    trunk/spambayes/spambayes/storage.py
    trunk/spambayes/spambayes/test/test_sb_server.py
    trunk/spambayes/spambayes/test/test_smtpproxy.py
    trunk/spambayes/spambayes/tokenizer.py
    trunk/spambayes/testtools/fpfn.py
    trunk/spambayes/testtools/incremental.py
    trunk/spambayes/testtools/mboxtest.py
    trunk/spambayes/utilities/mboxcount.py
    trunk/spambayes/utilities/rebal.py
    trunk/spambayes/utilities/splitn.py
    trunk/spambayes/utilities/splitndirs.py
    trunk/spambayes/windows/autoconfigure.py
    trunk/spambayes/windows/pop3proxy_tray.py

Modified: trunk/spambayes/CHANGELOG.txt
===================================================================
--- trunk/spambayes/CHANGELOG.txt	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/CHANGELOG.txt	2008-12-06 23:48:53 UTC (rev 3225)
@@ -1,5 +1,12 @@
 [Note that all dates are in ISO 8601 format, e.g. YYYY-MM-DD to ease sorting]
 
+Release 1.1b1
+=============
+
+Skip Montanaro    2008-12-06  Start requiring Python >= 2.4.
+Skip Montanaro    2008-11-23  Route all pickle reads and writes through safepickle \
module. +Skip Montanaro    2008-11-23  Pick off a bunch of pylint nit (still tons to \
do). +
 Release 1.1a5
 =============
 

Modified: trunk/spambayes/Outlook2000/addin.py
===================================================================
--- trunk/spambayes/Outlook2000/addin.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/Outlook2000/addin.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -10,12 +10,6 @@
 # that is implicit anyway, I gave up
 import encodings
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # We have lots of locale woes.  The short story:
 # * Outlook/MAPI will change the locale on us as some predictable
 #   times - but also at unpredictable times.

Modified: trunk/spambayes/Outlook2000/config.py
===================================================================
--- trunk/spambayes/Outlook2000/config.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/Outlook2000/config.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -16,13 +16,6 @@
 except NameError:
     _ = lambda arg: arg
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 0==0, 1==0
-
-
 FOLDER_ID = r"\(\'[a-fA-F0-9]+\', \'[a-fA-F0-9]+\'\)"
 FIELD_NAME = r"[a-zA-Z0-9 ]+"
 # These are stored in the INI file.  They must not be localized - we can't

Modified: trunk/spambayes/Outlook2000/dialogs/FolderSelector.py
===================================================================
--- trunk/spambayes/Outlook2000/dialogs/FolderSelector.py	2008-12-06 20:43:33 UTC \
                (rev 3224)
+++ trunk/spambayes/Outlook2000/dialogs/FolderSelector.py	2008-12-06 23:48:53 UTC \
(rev 3225) @@ -19,13 +19,6 @@
 IIL_UNCHECKED = 1
 IIL_CHECKED = 2
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 # Helpers for building the folder list
 class FolderSpec:
     def __init__(self, folder_id, name, ignore_eids = None):

Modified: trunk/spambayes/Outlook2000/dialogs/async_processor.py
===================================================================
--- trunk/spambayes/Outlook2000/dialogs/async_processor.py	2008-12-06 20:43:33 UTC \
                (rev 3224)
+++ trunk/spambayes/Outlook2000/dialogs/async_processor.py	2008-12-06 23:48:53 UTC \
(rev 3225) @@ -6,12 +6,6 @@
 
 import processors
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 verbose = 0
 
 IDC_START = 1100

Modified: trunk/spambayes/Outlook2000/dialogs/resources/rcparser.py
===================================================================
--- trunk/spambayes/Outlook2000/dialogs/resources/rcparser.py	2008-12-06 20:43:33 UTC \
                (rev 3224)
+++ trunk/spambayes/Outlook2000/dialogs/resources/rcparser.py	2008-12-06 23:48:53 UTC \
(rev 3225) @@ -5,12 +5,6 @@
 # Foundation license.
 __author__="Adam Walker"
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import sys, os, shlex
 import win32con
 #import win32gui

Modified: trunk/spambayes/Outlook2000/filter.py
===================================================================
--- trunk/spambayes/Outlook2000/filter.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/Outlook2000/filter.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -3,12 +3,6 @@
 # October, 2002
 # Copyright PSF, license under the PSF license
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # Action texts could be localized.
 # So comparing the action texts should be done using the same localized text.
 # These variables store the actions texts in the same localized form how the

Modified: trunk/spambayes/Outlook2000/manager.py
===================================================================
--- trunk/spambayes/Outlook2000/manager.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/Outlook2000/manager.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -18,12 +18,6 @@
 
 import msgstore
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # Characters valid in a filename.  Used to nuke bad chars from the profile
 # name (which we try and use as a filename).
 # We assume characters > 127 are OK as they may be unicode

Modified: trunk/spambayes/Outlook2000/msgstore.py
===================================================================
--- trunk/spambayes/Outlook2000/msgstore.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/Outlook2000/msgstore.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -17,12 +17,6 @@
 except ImportError:
     from StringIO import StringIO
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # MAPI imports etc.
 from win32com.client import Dispatch, constants
 from win32com.mapi import mapi, mapiutil

Modified: trunk/spambayes/Outlook2000/train.py
===================================================================
--- trunk/spambayes/Outlook2000/train.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/Outlook2000/train.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -8,13 +8,6 @@
 import traceback
 from win32com.mapi import mapi
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 # Note our Message Database uses PR_SEARCH_KEY, *not* PR_ENTRYID, as the
 # latter changes after a Move operation - see msgstore.py
 def been_trained_as_ham(msg):

Modified: trunk/spambayes/contrib/showclues.py
===================================================================
--- trunk/spambayes/contrib/showclues.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/contrib/showclues.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -45,12 +45,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
 __credits__ = "All the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import cgi
 import sys
 import getopt

Modified: trunk/spambayes/pspam/pop.py
===================================================================
--- trunk/spambayes/pspam/pop.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/pspam/pop.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -44,13 +44,6 @@
 import pspam.database
 from spambayes.Options import options
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 HEADER = "X-Spambayes: %5.3f\r\n"
 HEADER_SIZE = len(HEADER % 0.0)
 

Modified: trunk/spambayes/pspam/pspam/folder.py
===================================================================
--- trunk/spambayes/pspam/pspam/folder.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/pspam/pspam/folder.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -9,13 +9,6 @@
 
 from pspam.message import PMessage
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 def factory(fp):
     try:
         return email.message_from_file(fp, PMessage)

Modified: trunk/spambayes/pspam/pspam/profile.py
===================================================================
--- trunk/spambayes/pspam/pspam/profile.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/pspam/pspam/profile.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -13,13 +13,6 @@
 
 import os
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 def open_folders(dir, names, klass):
     L = []
     for name in names:

Modified: trunk/spambayes/pspam/scoremsg.py
===================================================================
--- trunk/spambayes/pspam/scoremsg.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/pspam/scoremsg.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -9,13 +9,6 @@
 import pspam.database
 from spambayes.tokenizer import tokenize
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 def main(fp):
     charset = locale.getdefaultlocale()[1]
     if not charset:

Modified: trunk/spambayes/pspam/update.py
===================================================================
--- trunk/spambayes/pspam/update.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/pspam/update.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -7,13 +7,6 @@
 
 from spambayes.Options import options
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 def folder_exists(L, p):
     """Return true folder with path p exists in list L."""
     for f in L:

Modified: trunk/spambayes/scripts/core_server.py
===================================================================
--- trunk/spambayes/scripts/core_server.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/core_server.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -42,12 +42,6 @@
 __credits__ = "Tim Peters, Neale Pickett, Tim Stone, all the Spambayes folk."
 
 try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-try:
     reversed
 except NameError:
     # Maintain compatibility with Python 2.2 and 2.3

Modified: trunk/spambayes/scripts/sb_bnserver.py
===================================================================
--- trunk/spambayes/scripts/sb_bnserver.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_bnserver.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -29,12 +29,6 @@
 
 import os, getopt, sys, SocketServer, traceback, select, socket, errno
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # See Options.py for explanations of these properties
 program = sys.argv[0]
   

Modified: trunk/spambayes/scripts/sb_dbexpimp.py
===================================================================
--- trunk/spambayes/scripts/sb_dbexpimp.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_dbexpimp.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -77,13 +77,7 @@
 
 __author__ = "Tim Stone <tim at fourstonesExpressions.com>"
 
-# Python 2.2 compatibility stuff
 try:
-    True, False
-except NameError:
-    True, False = 1, 0
-
-try:
     import csv
     # might get the old object craft csv module - has no reader attr 
     if not hasattr(csv, "reader"): 

Modified: trunk/spambayes/scripts/sb_filter.py
===================================================================
--- trunk/spambayes/scripts/sb_filter.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_filter.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -83,12 +83,6 @@
 from spambayes import hammie, Options, mboxutils, storage
 from spambayes.Version import get_current_version
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # See Options.py for explanations of these properties
 program = sys.argv[0]
 

Modified: trunk/spambayes/scripts/sb_imapfilter.py
===================================================================
--- trunk/spambayes/scripts/sb_imapfilter.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_imapfilter.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -70,12 +70,6 @@
 __credits__ = "All the SpamBayes folk. The original filter design owed " \
               "much to isbg by Roger Binns (http://www.rogerbinns.com/isbg)."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # If we are running as a frozen application, then chances are that
 # output is just lost.  We'd rather log this, like sb_server and Oulook
 # log, so that the user can pull up the output if possible.  We could just

Modified: trunk/spambayes/scripts/sb_mailsort.py
===================================================================
--- trunk/spambayes/scripts/sb_mailsort.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_mailsort.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -38,13 +38,6 @@
     from spambayes.tokenizer import tokenize
 
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 program = sys.argv[0] # For usage(); referenced by docstring above
 
 def usage(code, msg=''):

Modified: trunk/spambayes/scripts/sb_mboxtrain.py
===================================================================
--- trunk/spambayes/scripts/sb_mboxtrain.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_mboxtrain.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -42,12 +42,6 @@
         set [section, option] in the options database to value
 """
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import sys, os, getopt, email
 import shutil
 from spambayes import hammie, storage, mboxutils

Modified: trunk/spambayes/scripts/sb_notesfilter.py
===================================================================
--- trunk/spambayes/scripts/sb_notesfilter.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_notesfilter.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -135,14 +135,6 @@
 __author__ = "Tim Stone <tim at fourstonesExpressions.com>"
 __credits__ = "Mark Hammond, for his remarkable win32 modules."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-    def bool(val):
-        return not not val
-
 import sys
 import errno
 import getopt

Modified: trunk/spambayes/scripts/sb_pop3dnd.py
===================================================================
--- trunk/spambayes/scripts/sb_pop3dnd.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_pop3dnd.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -55,12 +55,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
 __credits__ = "All the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import os
 import re
 import sys

Modified: trunk/spambayes/scripts/sb_server.py
===================================================================
--- trunk/spambayes/scripts/sb_server.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_server.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -49,12 +49,6 @@
 __credits__ = "Tim Peters, Neale Pickett, Tim Stone, all the Spambayes folk."
 
 try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-try:
     reversed
 except NameError:
     # Maintain compatibility with Python 2.2 and 2.3

Modified: trunk/spambayes/scripts/sb_upload.py
===================================================================
--- trunk/spambayes/scripts/sb_upload.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_upload.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -35,12 +35,6 @@
 __author__ = "Skip Montanaro <skip at pobox.com>"
 __credits__ = "Spambayes gang, Wade Leftwich"
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # appropriated verbatim from a recipe by Wade Leftwich in the Python
 # Cookbook: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
 

Modified: trunk/spambayes/scripts/sb_xmlrpcserver.py
===================================================================
--- trunk/spambayes/scripts/sb_xmlrpcserver.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/scripts/sb_xmlrpcserver.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -30,13 +30,6 @@
 from spambayes import hammie, Options
 from spambayes import storage
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 class ReusableSimpleXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer):
     allow_reuse_address = True
 

Modified: trunk/spambayes/setup.py
===================================================================
--- trunk/spambayes/setup.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/setup.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -5,32 +5,14 @@
 
 from setuptools import setup, find_packages
 
-if sys.version < '2.2':
-    print "Error: Python version too old. You need at least Python 2.2 to use this \
                package."
-    print "(you're running version %s)"%sys.version
+if sys.version_info < (2, 4):
+    print "Error: You need at least Python 2.4 to use SpamBayes."
+    print "You're running version %s." % sys.version
     sys.exit(0)
 
 # Install
 from distutils.core import setup
 
-import email
-if email.__version__ < '2.4.3':
-    print "Error: email package version < 2.4.3 found - need newer version"
-    print "See README.txt for download information for email package"
-    sys.exit(0)
-
-# patch distutils if it can't cope with the "classifiers" keyword.
-# this just makes it ignore it.
-if sys.version < '2.2.3':
-    from distutils.dist import DistributionMetadata
-    DistributionMetadata.classifiers = None
-
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 from spambayes import __version__
 
 import distutils.command.install_scripts
@@ -116,6 +98,11 @@
     scripts.append('windows/pop3proxy_service.py')
     scripts.append('windows/pop3proxy_tray.py')
 
+if sys.version_info >= (3, 0):
+    lf_min_version = "0.6"
+else:
+    lf_min_version = "0.2"
+
 setup(
     name='spambayes',
     version = __version__,
@@ -123,7 +110,7 @@
     author = "the spambayes project",
     author_email = "spambayes at python.org",
     url = "http://spambayes.sourceforge.net",
-    install_requires = ["lockfile>=0.2",
+    install_requires = ["lockfile>=%s" % lf_min_version,
                         "pydns>=2.0"],
     cmdclass = {'install_scripts': install_scripts,
                 'sdist': sdist,

Modified: trunk/spambayes/spambayes/CoreUI.py
===================================================================
--- trunk/spambayes/spambayes/CoreUI.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/CoreUI.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -46,12 +46,6 @@
 __author__ = "Richie Hindle <richie at entrian.com>"
 __credits__ = "Tim Peters, Neale Pickett, Tim Stone, all the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import sys
 import cgi
 import time

Modified: trunk/spambayes/spambayes/Corpus.py
===================================================================
--- trunk/spambayes/spambayes/Corpus.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/Corpus.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -81,14 +81,6 @@
 __author__ = "Tim Stone <tim at fourstonesExpressions.com>"
 __credits__ = "Richie Hindle, Tim Peters, all the spambayes contributors."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-    def bool(val):
-        return not not val
-
 import sys           # for output of docstring
 import time
 

Modified: trunk/spambayes/spambayes/Dibbler.py
===================================================================
--- trunk/spambayes/spambayes/Dibbler.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/Dibbler.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -177,12 +177,6 @@
 except ImportError:
     from md5 import new as md5
 try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-try:
     "".rstrip("abc")
 except TypeError:
     # rstrip(chars) requires Python 2.2.2 or higher.  Apart from that

Modified: trunk/spambayes/spambayes/Histogram.py
===================================================================
--- trunk/spambayes/spambayes/Histogram.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/Histogram.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -3,13 +3,6 @@
 
 from spambayes.Options import options
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 class Hist:
     """Simple histograms of float values."""
 

Modified: trunk/spambayes/spambayes/ImapUI.py
===================================================================
--- trunk/spambayes/spambayes/ImapUI.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/ImapUI.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -35,12 +35,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>, Tim Stone"
 __credits__ = "All the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import cgi
 
 from spambayes import UserInterface

Modified: trunk/spambayes/spambayes/Options.py
===================================================================
--- trunk/spambayes/spambayes/Options.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/Options.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -20,12 +20,6 @@
 import sys, os
 
 try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-try:
     _
 except NameError:
     _ = lambda arg: arg

Modified: trunk/spambayes/spambayes/OptionsClass.py
===================================================================
--- trunk/spambayes/spambayes/OptionsClass.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/OptionsClass.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -90,14 +90,6 @@
 import locale
 
 try:
-    True, False, bool
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-    def bool(val):
-        return not not val
-
-try:
     import textwrap
 except ImportError:
     # textwrap was added in 2.3

Modified: trunk/spambayes/spambayes/ProxyUI.py
===================================================================
--- trunk/spambayes/spambayes/ProxyUI.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/ProxyUI.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -47,12 +47,6 @@
 __author__ = "Richie Hindle <richie at entrian.com>"
 __credits__ = "Tim Peters, Neale Pickett, Tim Stone, all the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import cgi
 import time
 import types

Modified: trunk/spambayes/spambayes/ServerUI.py
===================================================================
--- trunk/spambayes/spambayes/ServerUI.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/ServerUI.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -28,12 +28,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
 __credits__ = "All the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 from spambayes import UserInterface
 from spambayes.Options import options
 

Modified: trunk/spambayes/spambayes/Stats.py
===================================================================
--- trunk/spambayes/spambayes/Stats.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/Stats.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -33,12 +33,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
 __credits__ = "Kenny Pitt, Mark Hammond, all the spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import time
 
 from spambayes.message import STATS_START_KEY, STATS_STORAGE_KEY

Modified: trunk/spambayes/spambayes/TestDriver.py
===================================================================
--- trunk/spambayes/spambayes/TestDriver.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/TestDriver.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -39,13 +39,6 @@
 from spambayes.Histogram import Hist
 from spambayes.safepickle import pickle_write
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 def printhist(tag, ham, spam, nbuckets=options["TestDriver", "nbuckets"]):
     print
     print "-> <stat> Ham scores for", tag,

Modified: trunk/spambayes/spambayes/TestToolsUI.py
===================================================================
--- trunk/spambayes/spambayes/TestToolsUI.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/TestToolsUI.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -25,12 +25,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
 __credits__ = "All the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import os
 import sys
 import cgi

Modified: trunk/spambayes/spambayes/Tester.py
===================================================================
--- trunk/spambayes/spambayes/Tester.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/Tester.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -1,12 +1,5 @@
 from spambayes.Options import options
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 class Test:
     # Pass a classifier instance (an instance of Bayes).
     # Loop:

Modified: trunk/spambayes/spambayes/UserInterface.py
===================================================================
--- trunk/spambayes/spambayes/UserInterface.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/UserInterface.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -62,12 +62,6 @@
                 Tim Stone <tim at fourstonesExpressions.com>"""
 __credits__ = "Tim Peters, Neale Pickett, Tony Meyer, all the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import re
 import os
 import sys

Modified: trunk/spambayes/spambayes/__init__.py
===================================================================
--- trunk/spambayes/spambayes/__init__.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/__init__.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -1,4 +1,4 @@
 # package marker.
 
-__version__ = "1.1a4"
-__date__ = "June 25, 2007"
+__version__ = "1.1b1"
+__date__ = "November 23, 2008"

Modified: trunk/spambayes/spambayes/chi2.py
===================================================================
--- trunk/spambayes/spambayes/chi2.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/chi2.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -1,13 +1,6 @@
 import math as _math
 import random
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 def chi2Q(x2, v, exp=_math.exp, min=min):
     """Return prob(chisq >= x2, with v degrees of freedom).
 

Modified: trunk/spambayes/spambayes/classifier.py
===================================================================
--- trunk/spambayes/spambayes/classifier.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/classifier.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -79,13 +79,6 @@
 from spambayes.chi2 import chi2Q
 from spambayes.safepickle import pickle_read, pickle_write
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 LN2 = math.log(2)       # used frequently by chi-combining
 
 slurp_wordstream = None

Modified: trunk/spambayes/spambayes/compatsets.py
===================================================================
--- trunk/spambayes/spambayes/compatsets.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/compatsets.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -59,13 +59,6 @@
 __all__ = ['BaseSet', 'Set', 'ImmutableSet']
 
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 class BaseSet(object):
     """Common base class for mutable and immutable sets."""
 

Modified: trunk/spambayes/spambayes/hammie.py
===================================================================
--- trunk/spambayes/spambayes/hammie.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/hammie.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -7,13 +7,6 @@
 from spambayes.Options import options
 from spambayes.tokenizer import tokenize
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 class Hammie:
     """A spambayes mail filter.
 

Modified: trunk/spambayes/spambayes/hammiebulk.py
===================================================================
--- trunk/spambayes/spambayes/hammiebulk.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/hammiebulk.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -37,14 +37,6 @@
         Only meaningful with the -u option.
 """
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-    def bool(val):
-        return not not val
-
 import sys
 import os
 import getopt

Modified: trunk/spambayes/spambayes/i18n.py
===================================================================
--- trunk/spambayes/spambayes/i18n.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/i18n.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -15,12 +15,6 @@
 __author__ = "Hernan Martinez Foffani <hfoffani at yahoo.com>"
 __credits__ = "Tony Meyer, All the SpamBayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import os
 import sys
 from locale import getdefaultlocale

Modified: trunk/spambayes/spambayes/message.py
===================================================================
--- trunk/spambayes/spambayes/message.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/message.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -73,14 +73,6 @@
 __author__ = "Tim Stone <tim at fourstonesExpressions.com>"
 __credits__ = "Mark Hammond, Tony Meyer, all the spambayes contributors."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-    def bool(val):
-        return not not val
-
 import sys
 import types
 import time

Modified: trunk/spambayes/spambayes/smtpproxy.py
===================================================================
--- trunk/spambayes/spambayes/smtpproxy.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/smtpproxy.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -46,13 +46,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
 __credits__ = "Tim Stone, all the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 todo = """
  o It would be nice if spam/ham could be bulk forwarded to the proxy,
    rather than one by one.  This would require separating the different

Modified: trunk/spambayes/spambayes/storage.py
===================================================================
--- trunk/spambayes/spambayes/storage.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/storage.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -54,14 +54,6 @@
               "Tim Stone <tim at fourstonesExpressions.com>")
 __credits__ = "All the spambayes contributors."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-    def bool(val):
-        return not not val
-
 import os
 import sys
 import time

Modified: trunk/spambayes/spambayes/test/test_sb_server.py
===================================================================
--- trunk/spambayes/spambayes/test/test_sb_server.py	2008-12-06 20:43:33 UTC (rev \
                3224)
+++ trunk/spambayes/spambayes/test/test_sb_server.py	2008-12-06 23:48:53 UTC (rev \
3225) @@ -27,12 +27,6 @@
 __author__ = "Richie Hindle <richie at entrian.com>"
 __credits__ = "All the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # This code originally formed a part of pop3proxy.py.  If you are examining
 # the history of this file, you may need to go back to there.
 

Modified: trunk/spambayes/spambayes/test/test_smtpproxy.py
===================================================================
--- trunk/spambayes/spambayes/test/test_smtpproxy.py	2008-12-06 20:43:33 UTC (rev \
                3224)
+++ trunk/spambayes/spambayes/test/test_smtpproxy.py	2008-12-06 23:48:53 UTC (rev \
3225) @@ -24,12 +24,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
 __credits__ = "Richie Hindle, Mark Hammond, all the SpamBayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # One example of spam and one of ham - both are used to train, and are
 # then classified.  Not a good test of the classifier, but a perfectly
 # good test of the SMTP proxy.  These are the same messages as in the

Modified: trunk/spambayes/spambayes/tokenizer.py
===================================================================
--- trunk/spambayes/spambayes/tokenizer.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/spambayes/tokenizer.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -32,13 +32,6 @@
 from spambayes.mboxutils import get_message
 
 try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
-try:
     from spambayes import dnscache
     cache = dnscache.cache(cachefile=options["Tokenizer", "lookup_ip_cache"])
     cache.printStatsAtEnd = False

Modified: trunk/spambayes/testtools/fpfn.py
===================================================================
--- trunk/spambayes/testtools/fpfn.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/testtools/fpfn.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -16,12 +16,6 @@
         Requires spambayes package on the PYTHONPATH.
 """
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 import os
 import re
 import sys

Modified: trunk/spambayes/testtools/incremental.py
===================================================================
--- trunk/spambayes/testtools/incremental.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/testtools/incremental.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -32,12 +32,6 @@
 from email import Message
 from testtools import regimes
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 class Test:
     # Pass a classifier instance (an instance of Bayes).
     # Loop:

Modified: trunk/spambayes/testtools/mboxtest.py
===================================================================
--- trunk/spambayes/testtools/mboxtest.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/testtools/mboxtest.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -35,13 +35,6 @@
 from spambayes.msgs import Msg
 from spambayes.Options import options
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 mbox_fmts = {"unix": mailbox.PortableUnixMailbox,
              "mmdf": mailbox.MmdfMailbox,
              "mh": mailbox.MHMailbox,

Modified: trunk/spambayes/utilities/mboxcount.py
===================================================================
--- trunk/spambayes/utilities/mboxcount.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/utilities/mboxcount.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -34,13 +34,6 @@
 
 from spambayes.mboxutils import get_message
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 program = sys.argv[0]
 
 def usage(code, msg=''):

Modified: trunk/spambayes/utilities/rebal.py
===================================================================
--- trunk/spambayes/utilities/rebal.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/utilities/rebal.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -68,13 +68,6 @@
 import glob
 import getopt
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 # defaults
 NPERDIR = 4000
 TOPDIR = os.path.join('Data', 'Ham')

Modified: trunk/spambayes/utilities/splitn.py
===================================================================
--- trunk/spambayes/utilities/splitn.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/utilities/splitn.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -46,13 +46,6 @@
 
 from spambayes import mboxutils
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 program = sys.argv[0]
 
 def usage(code, msg=''):

Modified: trunk/spambayes/utilities/splitndirs.py
===================================================================
--- trunk/spambayes/utilities/splitndirs.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/utilities/splitndirs.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -58,13 +58,6 @@
 
 from spambayes import mboxutils
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
-
 program = sys.argv[0]
 
 def usage(code, msg=''):

Modified: trunk/spambayes/windows/autoconfigure.py
===================================================================
--- trunk/spambayes/windows/autoconfigure.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/windows/autoconfigure.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -44,12 +44,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
 __credits__ = "All the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 ## Tested with:
 ##  o Eudora 5.2 on Windows XP
 ##  o Mozilla 1.3 on Windows XP

Modified: trunk/spambayes/windows/pop3proxy_tray.py
===================================================================
--- trunk/spambayes/windows/pop3proxy_tray.py	2008-12-06 20:43:33 UTC (rev 3224)
+++ trunk/spambayes/windows/pop3proxy_tray.py	2008-12-06 23:48:53 UTC (rev 3225)
@@ -11,12 +11,6 @@
 __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>, Adam Walker"
 __credits__ = "Mark Hammond, all the Spambayes folk."
 
-try:
-    True, False
-except NameError:
-    # Maintain compatibility with Python 2.2
-    True, False = 1, 0
-
 # Heavily based on the win32gui_taskbar.py demo from Mark Hammond's
 # win32 extensions.
 


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic