This is a prerequisite for #28197 - ipython does no longer honor the DICT_IS_ORDERED variable since 7.10 [1].
[1] ipython/ipython@dffa2c3
For doctesting we overwrite the default pretty print function for dictionaries to sort the keys and behave exactly as before.
CC: @jhpalmieri @dimpase @tscrim @antonio-rojas
Component: refactoring
Author: Jonathan Kliem, Antonio Rojas
Branch/Commit: 68b10e1
Reviewer: François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/29042