]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-13365...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 1 Jun 2025 03:02:38 +0000 (05:02 +0200)
committerGitHub <noreply@github.com>
Sun, 1 Jun 2025 03:02:38 +0000 (20:02 -0700)
commit7c1dfd9c988be07c14892177db6b512e4983ca20
treee0048695ef3c157388f397d7068b38a97185252e
parenta8708f7320d1d752c92678043278cd75d97250d8
[3.14] gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-133658) (#134964)

gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-133658)

random.getrandbits() can now generate more that 2**31 bits.
random.randbytes() can now generate more that 256 MiB.
(cherry picked from commit 68784fed78aa297f0de0d038742495709185bef5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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