Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286972 - [TRACKER] Deprecation of bsddb and dbhash modules in dev-lang/python
Summary: [TRACKER] Deprecation of bsddb and dbhash modules in dev-lang/python
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: Tracker
Depends on: 284817 286496
Blocks:
  Show dependency tree
 
Reported: 2009-09-29 19:32 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2015-09-16 15:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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