[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

lamby report at bugs.python.org
Fri Feb 3 04:37:45 EST 2017


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 <report at bugs.python.org>
<http://bugs.python.org/issue29431>
_______________________________________


More information about the Python-bugs-list mailing list