mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue 2235: Py3k warnings are now emitted for classes that will no longer inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
This commit is contained in:
parent
f8d62d23e9
commit
48361f5cbf
18 changed files with 165 additions and 18 deletions
|
@ -309,6 +309,7 @@ class CoercionTest(unittest.TestCase):
|
|||
def __cmp__(slf, other):
|
||||
self.assert_(other == 42, 'expected evil_coercer, got %r' % other)
|
||||
return 0
|
||||
__hash__ = None # Invalid cmp makes this unhashable
|
||||
self.assertEquals(cmp(WackyComparer(), evil_coercer), 0)
|
||||
# ...and classic classes too, since that code path is a little different
|
||||
class ClassicWackyComparer:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue