Skip to content

Commit

Permalink
Merge pull request #893 from Stranger6667/dd/uniq-bug
Browse files Browse the repository at this point in the history
perf: Undesired fallback to brute force container uniqueness check on certain input types
  • Loading branch information
Julian authored Dec 15, 2021
2 parents c8059bc + f9f8995 commit ac7b838
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

* Fix undesired fallback to brute force container uniqueness check on certain input types

v4.2.1
------

Expand Down
2 changes: 1 addition & 1 deletion jsonschema/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ac7b838

Please sign in to comment.