[Python-checkins] python/dist/src/Lib/bsddb dbobj.py,1.6,1.7 dbtables.py,1.7,1.8
greg@users.sourceforge.net
greg@users.sourceforge.net
Tue, 08 Jul 2003 21:46:01 -0700
Update of /cvsroot/python/python/dist/src/Lib/bsddb
In directory sc8-pr-cvs1:/tmp/cvs-serv26130/bsddb
Modified Files:
dbobj.py dbtables.py
Log Message:
bsddb 4.1.6:
* Extended DB & DBEnv set_get_returns_none functionality to take a
"level" instead of a boolean flag. The boolean 0 and 1 values still
have the same effect. A value of 2 extends the "return None instead
of raising an exception" behaviour to the DBCursor set methods.
This will become the default behaviour in pybsddb 4.2.
* Fixed a typo in DBCursor.join_item method that made it crash instead
of returning a value. Obviously nobody uses it. Wrote a test case
for join and join_item.
Index: dbobj.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/dbobj.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dbobj.py 24 Apr 2003 16:02:45 -0000 1.6
--- dbobj.py 9 Jul 2003 04:45:59 -0000 1.7
***************
*** 16,19 ****
--- 16,25 ----
#
+ #
+ # TODO it would be *really nice* to have an automatic shadow class populator
+ # so that new methods don't need to be added here manually after being
+ # added to _bsddb.c.
+ #
+
import db
***************
*** 58,61 ****
--- 64,69 ----
def set_mp_mmapsize(self, *args, **kwargs):
return apply(self._cobj.set_mp_mmapsize, args, kwargs)
+ def set_timeout(self, *args, **kwargs):
+ return apply(self._cobj.set_timeout, args, kwargs)
def set_tmp_dir(self, *args, **kwargs):
return apply(self._cobj.set_tmp_dir, args, kwargs)
Index: dbtables.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/dbtables.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** dbtables.py 28 Jan 2003 17:20:42 -0000 1.7
--- dbtables.py 9 Jul 2003 04:45:59 -0000 1.8
***************
*** 156,159 ****
--- 156,162 ----
myflags |= DB_TRUNCATE
self.db = DB(self.env)
+ # this code relies on DBCursor.set* methods to raise exceptions
+ # rather than returning None
+ self.db.set_get_returns_none(1)
# allow duplicate entries [warning: be careful w/ metadata]
self.db.set_flags(DB_DUP)