Issue 2235: __hash__ is once again inherited by default, but inheritance can be blocked explicitly so that collections.Hashable remains meaningful
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 3c607f7..53b7611 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3283,12 +3283,20 @@
self.assertEqual(hash(d), 144)
D.__hash__ = lambda self: 100
self.assertEqual(hash(d), 100)
+ D.__hash__ = None
+ self.assertRaises(TypeError, hash, d)
del D.__hash__
self.assertEqual(hash(d), 144)
+ B.__hash__ = None
+ self.assertRaises(TypeError, hash, d)
del B.__hash__
self.assertEqual(hash(d), 314)
+ C.__hash__ = None
+ self.assertRaises(TypeError, hash, d)
del C.__hash__
self.assertEqual(hash(d), 42)
+ A.__hash__ = None
+ self.assertRaises(TypeError, hash, d)
del A.__hash__
self.assertEqual(hash(d), orig_hash)
d.foo = 42