bpo-32329: Fix -R option for hash randomization (#4873)
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 14 Dec 2017 23:51:22 +0000 (00:51 +0100)
committerGitHub <noreply@github.com>
Thu, 14 Dec 2017 23:51:22 +0000 (00:51 +0100)
commit358e5e17a51ba00742bfaee4557a94c3c4179c22
tree0918046bb6a75f31957b4d0aa24ca73df93d5bbf
parent96a5e50a5de3683b2afd6d680c7ecc4b525986f6
bpo-32329: Fix -R option for hash randomization (#4873)

bpo-32329, bpo-32030:

* The -R option now turns on hash randomization when the
  PYTHONHASHSEED environment variable is set to 0 Previously, the
  option was ignored.
* sys.flags.hash_randomization is now properly set to 0 when hash
  randomization is turned off by PYTHONHASHSEED=0.
* _PyCoreConfig_ReadEnv() now reads the PYTHONHASHSEED environment
  variable. _Py_HashRandomization_Init() now only apply the
  configuration, it doesn't read PYTHONHASHSEED anymore.
Doc/using/cmdline.rst
Include/pylifecycle.h
Lib/test/test_cmd_line.py
Misc/NEWS.d/next/Core and Builtins/2017-12-15-00-13-04.bpo-32329.q47IN2.rst [new file with mode: 0644]
Modules/main.c
Python/bootstrap_hash.c