bsddb module updated to version 4.7.2devel9.
This patch publishes the work done until now
for Python 3.0 compatibility. Still a lot
to be done.
When possible, we use 3.0 features in Python 2.6,
easing development and testing, and exposing internal
changes to a wider audience, for better test coverage.
Some mode details:
http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.7.2
diff --git a/Lib/bsddb/dbtables.py b/Lib/bsddb/dbtables.py
index 27028d3..ef52fed 100644
--- a/Lib/bsddb/dbtables.py
+++ b/Lib/bsddb/dbtables.py
@@ -22,7 +22,6 @@
import copy
import random
import struct
-from types import ListType, StringType
import cPickle as pickle
try:
@@ -229,7 +228,7 @@
raises TableDBError if it already exists or for other DB errors.
"""
- assert isinstance(columns, ListType)
+ assert isinstance(columns, list)
txn = None
try:
# checking sanity of the table and column names here on
@@ -270,7 +269,7 @@
"""Return a list of columns in the given table.
[] if the table doesn't exist.
"""
- assert isinstance(table, StringType)
+ assert isinstance(table, str)
if contains_metastrings(table):
raise ValueError, "bad table name: contains reserved metastrings"
@@ -300,7 +299,7 @@
additional columns present in the given list as well as
all of its current columns.
"""
- assert isinstance(columns, ListType)
+ assert isinstance(columns, list)
try:
self.CreateTable(table, columns)
except TableAlreadyExists: