﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26083	Python 2 deprecation warnings for classes that define __eq__() but not __hash__()	Mads Jensen	nobody	"Many classes within Django define the `__eq__` method, which in Python 3 will have disruptive implications for inheritance of `__hash__`. See the [https://docs.python.org/3.4/reference/datamodel.html#object.__hash__ Python 3 documentation for `__hash__`]:

    If a class does not define an __eq__() method it should not define a __hash__() operation either; if it defines __eq__() but not __hash__(), its instances will not be usable as items in hashable collections. […]

and continues on to describe in detail the implications of defining `__eq__` and/or `__hash__`, and exactly why one would implement one and/or the other on a class.

The warning emitted by `python2 -3` for this is:

    DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
"	Cleanup/optimization	new	Core (Other)	dev	Normal				Accepted	0	0	0	0	0	0
