From: Gregory P. Smith Date: Sun, 21 Sep 2003 23:18:29 +0000 (+0000) Subject: simplify some import statements and clean up a docstring and BerkeleyDB library X-Git-Tag: v2.3.1~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c627c44f3272999b11b9b045fa096f06df1f941;p=thirdparty%2FPython%2Fcpython.git simplify some import statements and clean up a docstring and BerkeleyDB library version check to mention that we support versions 3.2 - 4.2. --- diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index 6b4f96518802..f525a17e185e 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 c1749dfa0786..e6f1bb261c51 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 fe4c4d197fb0..003038ba56e6 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 3568b44a82b0..3f6384279f3d 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