summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/dbobj.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-12-30 20:53:52 (GMT)
committerBarry Warsaw <barry@python.org>2002-12-30 20:53:52 (GMT)
commit9a0d779c7d39ba5f4666eac7c3f913720198e0f8 (patch)
tree1c4c47178b74e5b8564c625d79a940107c217b04 /Lib/bsddb/dbobj.py
parent0a26235e671064ddda5625c1981aa2edf91bb7a8 (diff)
downloadcpython-9a0d779c7d39ba5f4666eac7c3f913720198e0f8.zip
cpython-9a0d779c7d39ba5f4666eac7c3f913720198e0f8.tar.gz
cpython-9a0d779c7d39ba5f4666eac7c3f913720198e0f8.tar.bz2
Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
version 4.1.1 and works with up to BerkeleyDB 4.1.25.
Diffstat (limited to 'Lib/bsddb/dbobj.py')
-rw-r--r--Lib/bsddb/dbobj.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/bsddb/dbobj.py b/Lib/bsddb/dbobj.py
index 10e036a..9268f55 100644
--- a/Lib/bsddb/dbobj.py
+++ b/Lib/bsddb/dbobj.py
@@ -17,7 +17,6 @@
import db
-
class DBEnv:
def __init__(self, *args, **kwargs):
self._cobj = apply(db.DBEnv, args, kwargs)
@@ -77,6 +76,14 @@ class DBEnv:
def set_get_returns_none(self, *args, **kwargs):
return apply(self._cobj.set_get_returns_none, args, kwargs)
+ if db.version() >= (4,1):
+ def dbremove(self, *args, **kwargs):
+ return apply(self._cobj.dbremove, args, kwargs)
+ def dbrename(self, *args, **kwargs):
+ return apply(self._cobj.dbrename, args, kwargs)
+ def set_encrypt(self, *args, **kwargs):
+ return apply(self._cobj.set_encrypt, args, kwargs)
+
class DB:
def __init__(self, dbenv, *args, **kwargs):
@@ -175,3 +182,8 @@ class DB:
return apply(self._cobj.verify, args, kwargs)
def set_get_returns_none(self, *args, **kwargs):
return apply(self._cobj.set_get_returns_none, args, kwargs)
+
+ if db.version() >= (4,1):
+ def set_encrypt(self, *args, **kwargs):
+ return apply(self._cobj.set_encrypt, args, kwargs)
+