From 2c627c44f3272999b11b9b045fa096f06df1f941 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sun, 21 Sep 2003 23:18:29 +0000 Subject: simplify some import statements and clean up a docstring and BerkeleyDB library version check to mention that we support versions 3.2 - 4.2. --- Lib/bsddb/__init__.py | 2 +- Lib/bsddb/db.py | 4 ++-- Lib/bsddb/dbshelve.py | 7 +------ Lib/bsddb/dbutils.py | 7 +------ 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index 6b4f965..f525a17 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -33,7 +33,7 @@ #---------------------------------------------------------------------- -"""Support for BerkeleyDB 3.1 through 4.1. +"""Support for BerkeleyDB 3.2 through 4.2. """ try: diff --git a/Lib/bsddb/db.py b/Lib/bsddb/db.py index c1749df..e6f1bb2 100644 --- a/Lib/bsddb/db.py +++ b/Lib/bsddb/db.py @@ -40,5 +40,5 @@ from _bsddb import * from _bsddb import __version__ -if version() < (3, 1, 0): - raise ImportError, "BerkeleyDB 3.x symbols not found. Perhaps python was statically linked with an older version?" +if version() < (3, 2, 0): + raise ImportError, "correct BerkeleyDB symbols not found. Perhaps python was statically linked with an older version?" diff --git a/Lib/bsddb/dbshelve.py b/Lib/bsddb/dbshelve.py index fe4c4d1..003038b 100644 --- a/Lib/bsddb/dbshelve.py +++ b/Lib/bsddb/dbshelve.py @@ -35,12 +35,7 @@ try: except ImportError: # DictMixin is new in Python 2.3 class DictMixin: pass -try: - # For Python 2.3 - from bsddb import db -except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db +import db #------------------------------------------------------------------------ diff --git a/Lib/bsddb/dbutils.py b/Lib/bsddb/dbutils.py index 3568b44..3f63842 100644 --- a/Lib/bsddb/dbutils.py +++ b/Lib/bsddb/dbutils.py @@ -26,12 +26,7 @@ # from time import sleep as _sleep -try: - # For Python 2.3 - from bsddb import db -except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db +import db # always sleep at least N seconds between retrys _deadlock_MinSleepTime = 1.0/64 -- cgit v0.12