This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2016-08-16.17:25:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Attached patch adds os.getrandom(): thin wrapper on the Linux getrandom() syscall.

os.getrandom() can return less bytes than requested.

The patch is incomplete: it doesn't include documentation.

I chose to not implement a loop to not loose entropy if a following call fails (ex: fail with EINTR). Rationale:

We should also add Solaris support later.

See also #27776: "PEP 524: Make os.urandom() blocking on Linux".
Date User Action Args
2016-08-16 17:25:41vstinnersetrecipients: + vstinner
2016-08-16 17:25:41vstinnersetmessageid: <>
2016-08-16 17:25:41vstinnerlinkissue27778 messages
2016-08-16 17:25:41vstinnercreate