diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 958982b..18764b8 100644
a
|
b
|
class BaseDatabaseWrapper(object):
|
51 | 51 | def __ne__(self, other): |
52 | 52 | return not self == other |
53 | 53 | |
| 54 | # You can have several connections with the same parameters, |
| 55 | # and they should not have the same hash. |
54 | 56 | __hash__ = object.__hash__ |
55 | 57 | |
56 | 58 | def get_connection_params(self): |
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index b70d235..178401c 100644
a
|
b
|
class Field(object):
|
135 | 135 | return self.creation_counter < other.creation_counter |
136 | 136 | return NotImplemented |
137 | 137 | |
138 | | __hash__ = object.__hash__ |
| 138 | def __hash__(self): |
| 139 | return hash(self.creation_counter) |
139 | 140 | |
140 | 141 | def __deepcopy__(self, memodict): |
141 | 142 | # We don't have to deepcopy very much here, since most things are not |
diff --git a/django/dispatch/saferef.py b/django/dispatch/saferef.py
index 7423669..c7731d4 100644
a
|
b
|
class BoundMethodWeakref(object):
|
152 | 152 | |
153 | 153 | __repr__ = __str__ |
154 | 154 | |
155 | | __hash__ = object.__hash__ |
| 155 | def __hash__(self): |
| 156 | return hash(self.key) |
156 | 157 | |
157 | 158 | def __bool__( self ): |
158 | 159 | """Whether we are still a valid reference""" |
diff --git a/django/test/html.py b/django/test/html.py
index 2f6e4c9..cda9dfa 100644
a
|
b
|
class Element(object):
|
85 | 85 | return False |
86 | 86 | return True |
87 | 87 | |
88 | | __hash__ = object.__hash__ |
| 88 | def __hash__(self): |
| 89 | return hash((self.name,) + tuple(a for a in self.attributes)) |
89 | 90 | |
90 | 91 | def __ne__(self, element): |
91 | 92 | return not self.__eq__(element) |
diff --git a/django/utils/functional.py b/django/utils/functional.py
index 1b5200c..6135175 100644
a
|
b
|
def lazy(func, *resultclasses):
|
150 | 150 | other = other.__cast() |
151 | 151 | return self.__cast() < other |
152 | 152 | |
153 | | __hash__ = object.__hash__ |
| 153 | def __hash__(self): |
| 154 | return hash(self.__cast()) |
154 | 155 | |
155 | 156 | def __mod__(self, rhs): |
156 | 157 | if self._delegate_bytes and not six.PY3: |