Skip to content

Fix uniq comparisons across hashability paths#1514

Open
Sanjays2402 wants to merge 1 commit into
python-jsonschema:mainfrom
Sanjays2402:fix/uniq-mixed-hashability
Open

Fix uniq comparisons across hashability paths#1514
Sanjays2402 wants to merge 1 commit into
python-jsonschema:mainfrom
Sanjays2402:fix/uniq-mixed-hashability

Conversation

@Sanjays2402

Copy link
Copy Markdown

uniq() could report equal values as unique when one uses the structural-hash path and the other falls back to pairwise comparison (for example, set and frozenset). Compare fallback values across both paths so the result no longer depends on input order.

Compare fallback values against values handled by the structural hash.
Add regression coverage for both input orderings.
@Julian

Julian commented Jul 14, 2026

Copy link
Copy Markdown
Member

Hi there -- such values aren't possible to encounter in JSON as far as I can tell from your patch. Is there some actual user-facing bug you see via this path (i.e. a schema)? If so we'd at least want to test via that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants