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

This commit is contained in:
Dong-hee Na 2021-07-24 09:14:08 +00:00 committed by GitHub
parent 7aac3f6236
commit 4463fa2fa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -4886,7 +4886,7 @@ Random numbers
device. If the ``/dev/urandom`` device is not available or not readable, the device. If the ``/dev/urandom`` device is not available or not readable, the
:exc:`NotImplementedError` exception is raised. :exc:`NotImplementedError` exception is raised.
On Windows, it will use ``CryptGenRandom()``. On Windows, it will use ``BCryptGenRandom()``.
.. seealso:: .. seealso::
The :mod:`secrets` module provides higher level functions. For an 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 function is now used. These functions avoid the usage of an internal file
descriptor. descriptor.
.. versionchanged:: 3.11
On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()``
which is deprecated.
.. data:: GRND_NONBLOCK .. data:: GRND_NONBLOCK
By default, when reading from ``/dev/random``, :func:`getrandom` blocks if By default, when reading from ``/dev/random``, :func:`getrandom` blocks if

View file

@ -201,8 +201,8 @@ math
os os
-- --
* On Windows, :func:`os.urandom`: uses BCryptGenRandom API instead of CryptGenRandom API * On Windows, :func:`os.urandom` uses ``BCryptGenRandom()`` instead of ``CryptGenRandom()``
which is deprecated from Microsoft Windows API. which is deprecated.
(Contributed by Dong-hee Na in :issue:`44611`.) (Contributed by Dong-hee Na in :issue:`44611`.)