Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4463fa2

Browse files
authored
bpo-44611: Update docs for os and whatsnew 3.11 (#27314)
1 parent 7aac3f6 commit 4463fa2

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Doc/library/os.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4886,7 +4886,7 @@ Random numbers
48864886
device. If the ``/dev/urandom`` device is not available or not readable, the
48874887
:exc:`NotImplementedError` exception is raised.
48884888

4889-
On Windows, it will use ``CryptGenRandom()``.
4889+
On Windows, it will use ``BCryptGenRandom()``.
48904890

48914891
.. seealso::
48924892
The :mod:`secrets` module provides higher level functions. For an
@@ -4907,6 +4907,10 @@ Random numbers
49074907
function is now used. These functions avoid the usage of an internal file
49084908
descriptor.
49094909

4910+
.. versionchanged:: 3.11
4911+
On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()``
4912+
which is deprecated.
4913+
49104914
.. data:: GRND_NONBLOCK
49114915

49124916
By default, when reading from ``/dev/random``, :func:`getrandom` blocks if

Doc/whatsnew/3.11.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ math
201201
os
202202
--
203203

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

208208

0 commit comments

Comments
 (0)