[Python-Dev] bsddb3 imported (original) (raw)

Martin v. Loewis martin@v.loewis.de
19 Nov 2002 19:03:24 +0100


barry@python.org (Barry A. Warsaw) writes:

Off the top of my head (because I have to run in a moment), create a test/ subdir inside Lib/bsddb and drop the tests there. Hack Lib/test/testbsddb.py to run Lib/bsddb/test/testall.py when -u bsddb is given.

I do something similar (w/o the -u) for the email pkg tests.

Ok, done. The test suite produces a number of errors for me, namely multiple occurrences of

/home/martin/work/pybsd/Lib/bsddb/test/test_compat.py🔞 RuntimeWarning: mktemp is a potential security risk to your program self.filename = tempfile.mktemp()

and of

Exception bsddb3._db.DBError: (0, 'DBCursor object has been closed') in <bound method DBShelfCursor.__del__ of <bsddb.dbshelve.DBShelfCursor instance at 0x4034f6ec>> ignored Exception exceptions.AttributeError: "bsdTableDB instance has no attribute 'db'" in <bound method bsdTableDB.__del__ of <bsddb.dbtables.bsdTableDB instance at 0x4035096c>> ignored

Running the testsuite with -v gives additional errors (9 of 177 tests fail). These failures are for test01_both, test02_dbobj_dict_interface, test01, and others, and they all have their traceback end with

DBNoSuchFileError: (2, 'No such file or directory -- db_home/__db.001: No such file or directory')

Greg, can you please take a look? It may be that I made a mistake when incorporating bsddb3, or it may be an error in the package itself.

Any insights appreciated.

Regards, Martin