Question

I am using a program written in Python which was last updated in 2003. I've got everything working now except for one import:

from BDBStorage.BerkeleyBase import BerkeleyConfig

This looks like an a very old version of the berkeley database module which is due to be deprecated in Python 3. The only reference I can find to it is here: http://buildbot.zope.org/Packages/BDBStorage/BerkeleyBase.py?graph=1.8&only_with_tag=bsddb3Storage_1_0beta4.

Unfortunately, the software comes with no documentation and the team which built it are unreachable.

Has anyone seen anything like it before?

The usage looks like:

berkeley_config = BerkeleyConfig()
berkeley_config.logdir = os.path.join(base_dir, "bdb_log")
berkeley_config.frequency = 3600
db_retriever = BerkeleyDatabaseRetriever(
    database_dir = os.path.join(base_dir, "dating_db"),
    config = berkeley_config)
Was it helpful?

Solution

A checkout of 794bb3cfcd04dcd309c28ae214a59003be49d0a5 in the Zope repo contains the BDBStorage module you are looking for,

$ python -c 'from BDBStorage.BerkeleyBase import BerkeleyConfig'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "BDBStorage/BerkeleyBase.py", line 31, in <module>
    from ZODB.lock_file import LockFile
ImportError: No module named ZODB.lock_file

It requires the ZODB moudle to be installed separately. The ZODB module is still actively developed, but I suspect the old BDBStorage module might require an old version from around 2003 (when the BDBStorage module was last modified, as far as I can tell)

Doesn't look like it'll be fun to get working..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top