New submission from lamby: Due to implementation changes, since CPython 3.6 dict keys are returned in insertion order. However, in order to test for reproducible builds [0], it would be convenient to be able to reverse this ordering; we would then run a build of an arbitrary package both with and without this flag and compare the resulting binary.
(We already run such a testing framework, so specifying this environment variable would be trivial. Note that this "reverse" would actually find more issues than simply relying on the pre-3.6 non-deterministic behaviour.) This patch changes the behaviour of: * for x in d: * d.popitem() * d.items() * _PyDict_Next [0] https://reproducible-builds.org/ ---------- components: Interpreter Core files: 0001-Add-a-PYTHONREVERSEDICTKEYORDER-environment-variable.patch keywords: patch messages: 286849 nosy: lamby priority: normal severity: normal status: open title: Add a PYTHONREVERSEDICTKEYORDER environment variable type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file46499/0001-Add-a-PYTHONREVERSEDICTKEYORDER-environment-variable.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29431> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com