Deprecate bsddb for removal in Python 3.0.

Closes issue 3776.
Review by Nick Coghlan.
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 7bfe1e5..780de74 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -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
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py
index 1520bf2..9980f24 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings.py
@@ -508,6 +508,7 @@
         wmod = self.module
         with wmod.catch_warnings(module=wmod, record=True) as w:
             self.assertEqual(w, [])
+            self.assertRaises(AttributeError, getattr, w, 'message')
             wmod.simplefilter("always")
             wmod.warn("foo")
             self.assertEqual(str(w.message), "foo")