diff options
| author | Jesus Cea <jcea@jcea.es> | 2008-07-23 11:38:42 (GMT) |
|---|---|---|
| committer | Jesus Cea <jcea@jcea.es> | 2008-07-23 11:38:42 (GMT) |
| commit | c5a11fabdb03d032f278f86e600bcdaafdb5d783 (patch) | |
| tree | e7db234112c7ac06aebe9c1e7833b0dd4168c664 /Lib/bsddb/dbutils.py | |
| parent | 30e208d525cd472446feb91b774cf472e7122918 (diff) | |
| download | cpython-c5a11fabdb03d032f278f86e600bcdaafdb5d783.zip cpython-c5a11fabdb03d032f278f86e600bcdaafdb5d783.tar.gz cpython-c5a11fabdb03d032f278f86e600bcdaafdb5d783.tar.bz2 | |
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
Diffstat (limited to 'Lib/bsddb/dbutils.py')
| -rw-r--r-- | Lib/bsddb/dbutils.py | 8 |
1 files changed, 7 insertions, 1 deletions
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 |
