Author: Amaury Forgeot d'Arc <amaur...@gmail.com> Branch: stdlib-2.7.3 Changeset: r57196:745fdd104890 Date: 2012-09-06 21:59 +0200 http://bitbucket.org/pypy/pypy/changeset/745fdd104890/
Log: We won't support hash randomization in the short term. Add a warning, and a note in the documentation. diff --git a/pypy/doc/cpython_differences.rst b/pypy/doc/cpython_differences.rst --- a/pypy/doc/cpython_differences.rst +++ b/pypy/doc/cpython_differences.rst @@ -285,6 +285,10 @@ Miscellaneous ------------- +* Hash randomization is not supported in PyPy. Passing ``-R`` to the + command line, or setting the ``PYTHONHASHSEED`` environment variable + will display a warning message. + * ``sys.setrecursionlimit()`` is ignored (and not needed) on PyPy. On CPython it would set the maximum number of nested calls that can occur before a RuntimeError is raised; on PyPy diff --git a/pypy/translator/goal/app_main.py b/pypy/translator/goal/app_main.py --- a/pypy/translator/goal/app_main.py +++ b/pypy/translator/goal/app_main.py @@ -444,6 +444,10 @@ (not options["ignore_environment"] and os.getenv('PYTHONINSPECT'))): options["inspect"] = 1 + if (options["hash_randomization"] or os.getenv('PYTHONHASHSEED')): + print >> sys.stderr, ( + "Warning: pypy does not implement hash randomization") + if PYTHON26 and we_are_translated(): flags = [options[flag] for flag in sys_flags] sys.flags = type(sys.flags)(flags) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit