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
This commit is contained in:
Jesus Cea 2008-07-23 11:38:42 +00:00
parent 30e208d525
commit c5a11fabdb
16 changed files with 1395 additions and 752 deletions

View file

@ -22,7 +22,6 @@ import sys
import copy
import random
import struct
from types import ListType, StringType
import cPickle as pickle
try:
@ -229,7 +228,7 @@ class bsdTableDB :
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 @@ class bsdTableDB :
"""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 @@ class bsdTableDB :
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: