summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2021-12-15 04:37:11 -0800
committerGitHub <noreply@github.com>2021-12-15 04:37:11 -0800
commitac7b8389f14e845a966345171eadf3515cc3052f (patch)
tree2e67141e84da6606a11863abd74e049dd7b90404
parentc8059bce68579b1a1a66babf067369baa158f07a (diff)
parentf9f89954068d4a389983e95244629d8f610f5a14 (diff)
downloadjsonschema-ac7b8389f14e845a966345171eadf3515cc3052f.tar.gz
Merge pull request #893 from Stranger6667/dd/uniq-bug
perf: Undesired fallback to brute force container uniqueness check on certain input types
-rw-r--r--CHANGELOG.rst3
-rw-r--r--jsonschema/_utils.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 81ff646..8619e1d 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,3 +1,6 @@
+
+* Fix undesired fallback to brute force container uniqueness check on certain input types
+
v4.2.1
------
diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py
index 0cfb84f..75d099e 100644
--- a/jsonschema/_utils.py
+++ b/jsonschema/_utils.py
@@ -188,7 +188,7 @@ def uniq(container):
sliced = itertools.islice(sort, 1, None)
for i, j in zip(sort, sliced):
- if _sequence_equal(i, j):
+ if equal(i, j):
return False
except (NotImplementedError, TypeError):