[Python-checkins] cpython (3.5): What's New in Python 3.5: document os.urandom() changes
victor.stinner
python-checkins at python.org
Wed Jul 29 02:30:01 CEST 2015
https://hg.python.org/cpython/rev/dab79e4dfa51
changeset: 97110:dab79e4dfa51
branch: 3.5
parent: 97108:62b45cf17fa1
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Jul 29 02:28:32 2015 +0200
summary:
What's New in Python 3.5: document os.urandom() changes
files:
Doc/library/os.rst | 6 ++++++
Doc/whatsnew/3.5.rst | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -3730,3 +3730,9 @@
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
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -648,6 +648,11 @@
* :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
-------
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list