Am 28.11.2013 10:53, schrieb Armin Rigo: > Hi, > > On Thu, Nov 28, 2013 at 7:14 AM, V S, Nagendra (Nonstop Filesystems Team) >> on NonStop "uuid.py" falls throw to random.range() call to generate the >> random number > > And indeed, the random module gets identical results in both parent > and child after a fork(). This seems to mean that the random module > is not safe to use in uuid without taking special care of this fact > (e.g. feeding back os.getpid() into the seed).
Yes, there is an issue with the fallback to random, see my 17 months old bug report: http://bugs.python.org/issue15206 The uuid module needs a fork() aware random instance like the tempfile module. Christian _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com