Merged revisions 77871,77910,77913 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77871 | ezio.melotti | 2010-01-31 13:46:54 +0200 (Sun, 31 Jan 2010) | 1 line

  #7092: silence more -3 and -Wd warnings
........
  r77910 | ezio.melotti | 2010-02-02 10:37:35 +0200 (Tue, 02 Feb 2010) | 1 line

  #7092: silence py3k warnings for bsddb. Patch by Florent Xicluna.
........
  r77913 | ezio.melotti | 2010-02-02 19:34:37 +0200 (Tue, 02 Feb 2010) | 1 line

  #7092: Silence py3k warnings in test_exceptions and test_pep352. Patch by Florent Xicluna.
........
diff --git a/Lib/bsddb/dbtables.py b/Lib/bsddb/dbtables.py
index 21cfe58..abc396a 100644
--- a/Lib/bsddb/dbtables.py
+++ b/Lib/bsddb/dbtables.py
@@ -332,7 +332,7 @@
         except db.DBError, dberror:
             if txn:
                 txn.abort()
-            if sys.version_info[0] < 3 :
+            if sys.version_info < (2, 6) :
                 raise TableDBError, dberror[1]
             else :
                 raise TableDBError, dberror.args[1]
@@ -416,7 +416,7 @@
             except db.DBError, dberror:
                 if txn:
                     txn.abort()
-                if sys.version_info[0] < 3 :
+                if sys.version_info < (2, 6) :
                     raise TableDBError, dberror[1]
                 else :
                     raise TableDBError, dberror.args[1]
@@ -499,7 +499,7 @@
             if txn:
                 txn.abort()
                 self.db.delete(_rowid_key(table, rowid))
-            if sys.version_info[0] < 3 :
+            if sys.version_info < (2, 6) :
                 raise TableDBError, dberror[1], info[2]
             else :
                 raise TableDBError, dberror.args[1], info[2]
@@ -554,7 +554,7 @@
                     raise
 
         except db.DBError, dberror:
-            if sys.version_info[0] < 3 :
+            if sys.version_info < (2, 6) :
                 raise TableDBError, dberror[1]
             else :
                 raise TableDBError, dberror.args[1]
@@ -598,7 +598,7 @@
                         txn.abort()
                     raise
         except db.DBError, dberror:
-            if sys.version_info[0] < 3 :
+            if sys.version_info < (2, 6) :
                 raise TableDBError, dberror[1]
             else :
                 raise TableDBError, dberror.args[1]
@@ -621,7 +621,7 @@
                 columns = self.__tablecolumns[table]
             matching_rowids = self.__Select(table, columns, conditions)
         except db.DBError, dberror:
-            if sys.version_info[0] < 3 :
+            if sys.version_info < (2, 6) :
                 raise TableDBError, dberror[1]
             else :
                 raise TableDBError, dberror.args[1]
@@ -677,7 +677,7 @@
             # leave all unknown condition callables alone as equals
             return 0
 
-        if sys.version_info[0] < 3 :
+        if sys.version_info < (2, 6) :
             conditionlist = conditions.items()
             conditionlist.sort(cmp_conditions)
         else :  # Insertion Sort. Please, improve
@@ -749,7 +749,7 @@
                         rowdata[column] = self.db.get(
                             _data_key(table, column, rowid))
                     except db.DBError, dberror:
-                        if sys.version_info[0] < 3 :
+                        if sys.version_info < (2, 6) :
                             if dberror[0] != db.DB_NOTFOUND:
                                 raise
                         else :