<div id="comment:0"></div> This is a prerequisite for #28197 - ipython does no longer honor the DICT_IS_ORDERED variable since 7.10 [1]. [1] https://github.com/ipython/ipython/commit/dffa2c33dea3ecc09256a66a6ddbc876ce0629a9 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`](https://github.com/sagemath/sagetrac-mirror/commit/68b10e1e6665892edad775e6b9b18e93afc3d637)** Reviewer: **François Bissey** _Issue created by migration from https://trac.sagemath.org/ticket/29042_