Message 267718 - Python tracker (original) (raw)

As a final note, let me steer you towards this comment in Python/random.c:

/* Issue #25003: Don' use getentropy() on Solaris (available since

Yes: we already had this discussion for Solaris, nine months ago, on issue #25003. Both Guido and Tim Peters were involved in the discussion. The decision there: use lower-quality random bits to seed the MT when importing the random module. Keeping the slowdown was so obviously wrong it wasn't even debated.

I will point out, that was a somewhat different situation as getentropy on Solaris is more like /dev/random in that it tries to decide how much random-ness is in the pool and will randomly block throughout the execution of the program. The getrandom() call on Linux (and Solaris) will, by default, only block on the first boot at the very beginning before the kernel has collected enough entropy.

I don't think this changes anything, I just want to be clear because there are two kinds of "blocking" in this discussion, one that only occurs in very specific scenarios and one that occurs regularly in the operation of the program.