]> granicus.if.org Git - python/commitdiff
What's New in Python 3.5: document os.urandom() changes
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 29 Jul 2015 00:28:32 +0000 (02:28 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 29 Jul 2015 00:28:32 +0000 (02:28 +0200)
Doc/library/os.rst
Doc/whatsnew/3.5.rst

index 16e5019f862208b80af335e461f47a6936e5805a..d4032e0c25650e02f32d01dec3d1317f2c7c7cb1 100644 (file)
@@ -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.
index a7f3dad9477f16cd2734e654c1e7fa5ece5538c9..3a3d4050555446fa062beb8ab171aeb55d89d404 100644 (file)
@@ -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
 -------