Skip to content

Commit 6b8e1f4

Browse files
committed
Remove __eq__, since it causes hashability issues on Py3 that I don't want to deal with at the moment.
1 parent b805101 commit 6b8e1f4

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

jsonschema/exceptions.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ def __init__(
2828
self.instance = instance
2929
self.schema = schema
3030

31-
def __eq__(self, other):
32-
if not isinstance(other, self.__class__):
33-
return NotImplemented
34-
return self._contents() == other._contents()
35-
36-
def __ne__(self, other):
37-
return not self == other
38-
3931
def __repr__(self):
4032
return "<%s: %r>" % (self.__class__.__name__, self.message)
4133

jsonschema/tests/test_exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ def test_one_error(self):
149149
validator = Draft4Validator({"minProperties" : 2})
150150
error, = validator.iter_errors({})
151151
self.assertEqual(
152-
exceptions.best_match(validator.iter_errors({})), error,
152+
exceptions.best_match(validator.iter_errors({})).validator,
153+
"minProperties",
153154
)
154155

155156
def test_no_errors(self):

0 commit comments

Comments
 (0)