]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-13365...
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 2 Jun 2025 20:16:30 +0000 (23:16 +0300)
committerGitHub <noreply@github.com>
Mon, 2 Jun 2025 20:16:30 +0000 (23:16 +0300)
commit3e1b8d6e678ed0d834c9bc37bbb599cd63e88a82
tree4c570437fa6a7945a3ea8cb82fe0619bfcf2046a
parenta9b8ffd9b9031d5b976a4de54468418118a24bf4
[3.13] gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-133658) (GH-134965)

random.getrandbits() can now generate more that 2**31 bits.
random.randbytes() can now generate more that 256 MiB.
(cherry picked from commit 68784fed78aa297f0de0d038742495709185bef5)
Lib/test/test_random.py
Misc/NEWS.d/next/Library/2025-05-08-13-43-19.gh-issue-133489.9eGS1Z.rst [new file with mode: 0644]
Modules/_randommodule.c
Modules/clinic/_randommodule.c.h
Objects/longobject.c