Skip to content

[PR #14050/966edc9d backport][9.0.x] Fix: assertrepr_compare respects dict insertion order#14193

Merged
nicoddemus merged 1 commit into9.0.xfrom
patchback/backports/9.0.x/966edc9d517cd092104028796b684fb1119a7c73/pr-14050
Feb 14, 2026
Merged

[PR #14050/966edc9d backport][9.0.x] Fix: assertrepr_compare respects dict insertion order#14193
nicoddemus merged 1 commit into9.0.xfrom
patchback/backports/9.0.x/966edc9d517cd092104028796b684fb1119a7c73/pr-14050

Conversation

@patchback
Copy link
Copy Markdown

@patchback patchback bot commented Feb 14, 2026

This is a backport of PR #14050 as merged into main (966edc9).

Closes #13503. Modified SafeRepr to override repr_dict and avoid sorting keys, ensuring that assertion failure messages preserve the user's insertion order for dictionaries.

@nicoddemus nicoddemus enabled auto-merge (squash) February 14, 2026 16:34
@nicoddemus nicoddemus disabled auto-merge February 14, 2026 17:02
@nicoddemus nicoddemus merged commit 60fb59d into 9.0.x Feb 14, 2026
32 of 33 checks passed
@nicoddemus nicoddemus deleted the patchback/backports/9.0.x/966edc9d517cd092104028796b684fb1119a7c73/pr-14050 branch February 14, 2026 17:02
@bluetech
Copy link
Copy Markdown
Member

bluetech commented Apr 7, 2026

@nicoddemus Looking over the changes for 9.0.3, I think this PR is not quite suitable for a patch release. It's not really a bug fix, and not a regression, a relatively big change in behavior. So I am going to revert it from 9.0.x and it will just wait for 9.1.0.

bluetech added a commit to bluetech/pytest that referenced this pull request Apr 7, 2026
…-dev#14050) (pytest-dev#14193)"

This reverts commit 60fb59d.

Revert 9.0.x backport, will wait for 9.1.0 instead.
bluetech added a commit that referenced this pull request Apr 7, 2026
[9.0.x] Revert "Fix: assertrepr_compare respects dict insertion order (#14050) (#14193)"
@nicoddemus
Copy link
Copy Markdown
Member

Agree, thanks for the catch!

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.

3 participants