Index: Doc/library/dbhash.rst =================================================================== --- Doc/library/dbhash.rst (revision 66201) +++ Doc/library/dbhash.rst (working copy) @@ -5,10 +5,8 @@ :synopsis: DBM-style interface to the BSD database library. .. sectionauthor:: Fred L. Drake, Jr. -.. note:: - The :mod:`dbhash` module has been renamed to :mod:`dbm.bsd` in Python 3.0. - The :term:`2to3` tool will automatically adapt imports when converting your - sources to 3.0. +.. deprecated:: 2.6 + The :mod:`dbhash` module has been deprecated for removal in Python 3.0. .. index:: module: bsddb Index: Doc/library/bsddb.rst =================================================================== --- Doc/library/bsddb.rst (revision 66201) +++ Doc/library/bsddb.rst (working copy) @@ -6,7 +6,10 @@ :synopsis: Interface to Berkeley DB database library .. sectionauthor:: Skip Montanaro +.. deprecated:: 2.6 + The :mod:`bsddb` module has been deprecated for removal in Python 3.0. + The :mod:`bsddb` module provides an interface to the Berkeley DB library. Users can create hash, btree or record based library files using the appropriate open call. Bsddb objects behave generally like dictionaries. Keys and values must be Index: Lib/bsddb/__init__.py =================================================================== --- Lib/bsddb/__init__.py (revision 66201) +++ Lib/bsddb/__init__.py (working copy) @@ -42,6 +42,12 @@ import sys absolute_import = (sys.version_info[0] >= 3) +if sys.py3kwarning: + import warnings + warnings.warnpy3k("in 3.x, bsddb has been removed; " + "please use the pybsddb project instead", + DeprecationWarning, 2) + try: if __name__ == 'bsddb3': # import _pybsddb binary as it should be the more recent version from Index: Lib/test/test_py3kwarn.py =================================================================== --- Lib/test/test_py3kwarn.py (revision 66201) +++ Lib/test/test_py3kwarn.py (working copy) @@ -305,7 +305,7 @@ 'sunos5' : ('sunaudiodev', 'SUNAUDIODEV'), } optional_modules = ('bsddb185', 'Canvas', 'dl', 'linuxaudiodev', 'imageop', - 'sv', 'cPickle') + 'sv', 'cPickle', 'bsddb', 'dbhash') def check_removal(self, module_name, optional=False): """Make sure the specified module, when imported, raises a Index: Lib/dbhash.py =================================================================== --- Lib/dbhash.py (revision 66201) +++ Lib/dbhash.py (working copy) @@ -1,6 +1,9 @@ """Provide a (g)dbm-compatible interface to bsddb.hashopen.""" import sys +if sys.py3kwarning: + import warnings + warnings.warnpy3k("in 3.x, dbhash has been removed", DeprecationWarning, 2) try: import bsddb except ImportError: