[Python-Dev] 2.3.2 and bsddb

Gregory P. Smith greg at electricrain.com
Wed Oct 1 01:55:53 EDT 2003

On Tue, Sep 30, 2003 at 12:45:05AM +1000, Anthony Baxter wrote:
> For those of you not following every bug in the SF tracker closely, 
> in http://www.python.org/sf/775414 it's been suggested that the docs
> for 2.3.2 include a warning about using the old-style interface to 
> bsddb (without a DBEnv) with multi-threaded applications. This seems
> like a prudent suggestion - does someone want to supply some words?
> Anthony

Attached is a patch.  Commit it if you like it.

-------------- next part --------------
Index: libbsddb.tex
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbsddb.tex,v
retrieving revision 1.11
diff --unified=5 -r1.11 libbsddb.tex
--- libbsddb.tex	28 May 2003 16:20:03 -0000	1.11
+++ libbsddb.tex	1 Oct 2003 05:51:11 -0000
@@ -28,10 +28,16 @@
 The following is a description of the legacy \module{bsddb} interface
 compatible with the old python bsddb module.  For details about the more
 modern Db and DbEnv object oriented interface see the above mentioned
 pybsddb URL.
+\warning{This legacy interface is not thread safe in python 2.3.x
+or earlier.  Data corruption, core dumps or deadlocks may occur if you
+attempt multi-threaded access.  You must use the modern pybsddb
+interface linked to above if you need multi-threaded or multi-process
+database access.}
 The \module{bsddb} module defines the following functions that create
 objects that access the appropriate type of Berkeley DB file.  The
 first two arguments of each function are the same.  For ease of
 portability, only the first two arguments should be used in most

More information about the Python-Dev mailing list