Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 286972

Summary: [TRACKER] Deprecation of bsddb and dbhash modules in dev-lang/python
Product: Gentoo Linux Reporter: Arfrever Frehtes Taifersar Arahesis (RETIRED) <arfrever>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED OBSOLETE    
Severity: normal CC: ikelos, petr, vincent
Priority: High Keywords: Tracker
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 284817, 286496    
Bug Blocks:    

Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-29 19:32:20 UTC
bsddb module is deprecated and will be removed in future versions.
Comment 1 Mike Auty (RETIRED) gentoo-dev 2011-02-16 01:38:10 UTC
It should be noted that files created using anydbm.open(FILE) when bsddb was installed, will have chosen that backend and will now fail as follows:

plasma python # etc-proposals 
Traceback (most recent call last):
  File "/usr/sbin/etc-proposals", line 11, in <module>
    from etcproposals.etcproposals_lib import Config, EtcProposals
  File "/usr/lib/python2.7/site-packages/etcproposals/etcproposals_lib.py", line 604, in <module>
    State = EtcProposalsState()
  File "/usr/lib/python2.7/site-packages/etcproposals/etcproposals_lib.py", line 566, in __init__
    shelve.Shelf.__init__(self, anydbm.open(STATEFILE, 'c'))
  File "/usr/lib/python2.7/anydbm.py", line 82, in open
    mod = __import__(result)
  File "/usr/lib/python2.7/dbhash.py", line 7, in <module>
    import bsddb
ImportError: No module named bsddb

In this instance the file in question was not required, and can simply be removed (to be recreated with a different db module), however it may be best to note this somewhere...
Comment 2 Ionut Turturica 2011-03-01 00:59:51 UTC
Python itself is using bsddb:

 $ grep bsddb "/usr/lib64/python2.6/dbhash.py"
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""
    import bsddb
error = bsddb.error                     # Exported for anydbm
    return bsddb.hashopen(file, flag, mode)

I'm running dev-lang/python-2.6.6-r2
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2015-09-16 15:10:35 UTC
python2.6 and the module both deprecated