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
diff --git a/Lib/bsddb/dbutils.py b/Lib/bsddb/dbutils.py
index 9a2f010..8d2e7ef 100644
--- a/Lib/bsddb/dbutils.py
+++ b/Lib/bsddb/dbutils.py
@@ -26,7 +26,13 @@
#
from time import sleep as _sleep
-import db
+import sys
+absolute_import = (sys.version_info[0] >= 3)
+if absolute_import :
+ # Because this syntaxis is not valid before Python 2.5
+ exec("from . import db")
+else :
+ import db
# always sleep at least N seconds between retrys
_deadlock_MinSleepTime = 1.0/128