ISTM the only reasonable thing is to have a random seed picked very early in the process, to be used to change the hash() function of str/bytes/unicode (in a way that they are still compatible with each other).<br><br>The seed should be unique per process except it should survive fork() (but not exec()). I&#39;m not worried about unrelated processes needing to have the same hash(), but I&#39;m not against offering an env variable or command line flag to force the seed.<br>

<br>I&#39;m not too concerned about a 3rd party being able to guess the random seed -- this would require much more effort on their part, since they would have to generate a new set of colliding keys each time they think they have guessed the hash (as long as they can&#39;t force the seed -- this actually argues slightly *against* offering a way to force the seed, except that we have strong backwards compatibility requirements).<br>

<br>We need to fix this as far back as Python 2.6, and it would be nice if a source patch was available that works on Python 2.5 -- personally I do have a need for a 2.5 fix and if nobody creates one I will probably end up backporting the fix from 2.6 to 2.5.<br>

<br>Is there a tracker issue yet? The discussion should probably move there.<br><br>PS. I would propose a specific fix but I can&#39;t seem to build a working CPython from the trunk on my laptop (OS X 10.6, Xcode 4.1). I get this error late in the build:<br>

<br>./python.exe -SE -m sysconfig --generate-posix-vars<br>Fatal Python error: Py_Initialize: can&#39;t initialize sys standard streams<br>Traceback (most recent call last):<br>  File &quot;/Users/guido/cpython/Lib/io.py&quot;, line 60, in &lt;module&gt;<br>

make: *** [Lib/_sysconfigdata.py] Abort trap<br><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)<br>