list(dict.keys()) is not deterministic and the order can be different in Python 2.7 and Python 3.7.
For Python 3.7+ the insertion order is respected and part of the Python spec.
For Python 3.6 the insertion order is respected but might not be safe
For previous versions including 2.7 the insertion order is not respected.
https://stackoverflow.com/questions/5629023/key-order-in-python-dictionaries
In result, methods using the order of dict keys may have different results in Python 3.6+ and previous versions.
Problematic methods using the oder of a dict keys() which must be inspected:
- i18n.translate()
- cosmetic_changes.fixArabicLetters() (has only one entry)
- page.WikibasePage.get()
- site.APISite.upload()
- casechecker.CaseChecker.PickTarget()
- page_tests.TestLinkObject.testNamespaces()