Author dmalcolm
Recipients Arach, Arfrever, Huzaifa.Sidhpurwala, Jim.Jewett, Mark.Shannon, PaulMcMillan, Zhiping.Deng, alex, barry, benjamin.peterson, christian.heimes, dmalcolm, eric.araujo, eric.snow, fx5, georg.brandl, grahamd, gregory.p.smith, gvanrossum, gz, jcea, lemburg, loewis, mark.dickinson, neologix, pitrou, skorgu, skrah, terry.reedy, tim.peters, v+python, vstinner, zbysz
Date 2012-02-11.23:06:23
SpamBayes Score 5.78426e-14
Marked as misclassified No
Message-id <1329001532.2149.7.camel@surprise>
In-reply-to <>
On Fri, 2012-02-10 at 23:02 +0000, STINNER Victor wrote:
> STINNER Victor <> added the comment:
> Review of add-randomization-(...).patch:
>  - there is a missing ")" in the doc, near "the types covered by the :option:`-R` option (or its equivalent, :envvar:`PYTHONHASHRANDOMIZATION`."
>  - get_hash() in fails completly on Windows: Windows requires some environment variables. Just use env=os.environ.copy() instead of env={}.
>  - PYTHONHASHSEED doc is not clear: it should be mentionned that the variable is ignored if PYTHONHASHRANDOMIZATION is not set
>  - (Python 2.6) test_hash fails because of "[xxx refs]" in stderr if Python is compiled in debug mode. Add strip_python_stderr() to and use it in get_hash().

I'm attaching revised versions of the "add-randomization" patches
incorporating review feedback:

The other pair of patches are unchanged from before:

Changes relative to *-2012-02-06-001.patch:
  * changed the wording of the docs relating to PYTHONHASHSEED in
Doc/using/cmdline.rst to:
    * clarify the interaction with PYTHONHASHRANDOMIZATION and -R
    * mentioning another possible use case: "to allow a cluster of
python processes to share hash values." (as per )
    * rewording the awkward "overrides the other setting"
  * I've added a description of PYTHONHASHSEED back to the man page and
to the --help text
  * grammar fixes for "Fail to" in 2.6 version of the patch (were
already fixed in 3.1)
  * restored __VMS randomization, by porting vms_urandom from
Modules/posixmodule.c to Python/random.c (though I have no way of
testing this)
  * changed env = {} to env = os.environ.copy() in get_hash() as noted
by haypo
  * fixed test_hash --with-pydebug as noted by haypo (and test_os),
adding strip_python_stderr from 2.7

I haven't enabled randomization in the
File name Uploaded
add-randomization-to-2.6-dmalcolm-2012-02-11-001.patch dmalcolm, 2012-02-11.23:06:14
add-randomization-to-3.1-dmalcolm-2012-02-11-001.patch dmalcolm, 2012-02-11.23:06:22
Date User Action Args
2012-02-11 23:06:28dmalcolmsetrecipients: + dmalcolm, lemburg, gvanrossum, tim.peters, loewis, barry, georg.brandl, terry.reedy, gregory.p.smith, jcea, mark.dickinson, pitrou, vstinner, christian.heimes, benjamin.peterson, eric.araujo, grahamd, Arfrever, v+python, alex, zbysz, skrah, gz, neologix, Arach, Mark.Shannon, eric.snow, Zhiping.Deng, Huzaifa.Sidhpurwala, Jim.Jewett, PaulMcMillan, fx5, skorgu
2012-02-11 23:06:24dmalcolmlinkissue13703 messages
2012-02-11 23:06:24dmalcolmcreate