[Python-checkins] bpo-44611: Update docs for os and whatsnew 3.11 (#27314)

ambv webhook-mailer at python.org
Sat Jul 24 05:14:12 EDT 2021


https://github.com/python/cpython/commit/4463fa2fa111e03f7ec47e6e9d433104aa943605
commit: 4463fa2fa111e03f7ec47e6e9d433104aa943605
branch: main
author: Dong-hee Na <donghee.na at python.org>
committer: ambv <lukasz at langa.pl>
date: 2021-07-24T11:14:08+02:00
summary:

bpo-44611: Update docs for os and whatsnew 3.11 (#27314)

files:
M Doc/library/os.rst
M Doc/whatsnew/3.11.rst

diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index d3ca8c0476d0c..59173d49936e8 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -4886,7 +4886,7 @@ Random numbers
    device. If the ``/dev/urandom`` device is not available or not readable, the
    :exc:`NotImplementedError` exception is raised.
 
-   On Windows, it will use ``CryptGenRandom()``.
+   On Windows, it will use ``BCryptGenRandom()``.
 
    .. seealso::
       The :mod:`secrets` module provides higher level functions. For an
@@ -4907,6 +4907,10 @@ Random numbers
       function is now used. These functions avoid the usage of an internal file
       descriptor.
 
+   .. versionchanged:: 3.11
+      On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()``
+      which is deprecated.
+
 .. data:: GRND_NONBLOCK
 
    By  default, when reading from ``/dev/random``, :func:`getrandom` blocks if
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 190c422d2a5ca..b29d0cbe1538d 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -201,8 +201,8 @@ math
 os
 --
 
-* On Windows, :func:`os.urandom`: uses BCryptGenRandom API instead of CryptGenRandom API
-  which is deprecated from Microsoft Windows API.
+* On Windows, :func:`os.urandom` uses ``BCryptGenRandom()`` instead of ``CryptGenRandom()``
+  which is deprecated.
   (Contributed by Dong-hee Na in :issue:`44611`.)
 
 



More information about the Python-checkins mailing list