From ace8848df69ba927c6fb4af7fffef706a1a19279 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 29 Jul 2015 02:28:32 +0200 Subject: [PATCH] What's New in Python 3.5: document os.urandom() changes --- Doc/library/os.rst | 6 ++++++ Doc/whatsnew/3.5.rst | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 16e5019f862..d4032e0c256 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3730,3 +3730,9 @@ Miscellaneous Functions For an easy-to-use interface to the random number generator provided by your platform, please see :class:`random.SystemRandom`. + + .. versionchanged:: 3.5 + On Linux 3.17 and newer, the ``getrandom()`` syscall is now used + when available. On OpenBSD 5.6 and newer, the C ``getentropy()`` + function is now used. These functions avoid the usage of an internal file + descriptor. diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index a7f3dad9477..3a3d4050555 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -648,6 +648,11 @@ os * :class:`os.stat_result` now has a :attr:`~os.stat_result.st_file_attributes` attribute on Windows. (Contributed by Ben Hoyt in :issue:`21719`.) +* :func:`os.urandom`: On Linux 3.17 and newer, the ``getrandom()`` syscall is + now used when available. On OpenBSD 5.6 and newer, the C ``getentropy()`` + function is now used. These functions avoid the usage of an internal file + descriptor. + os.path -------