Dict iteration order differs between Python 3.6 and 3.7+ — what should code rely on?
Dict ordering behavior across Python versions I maintain a library that iterates over dictionary keys and produces serialized output (for example, building query strings and config files) where the key order affects the result. Some deployments still run Python 3.6 while others run 3.7 or later. My understanding is that insertion-order preservation is only a