Skip to content

[3.13] gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-133658) - #134965

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-68784fe-3.13
Jun 2, 2025
Merged

serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-68784fe-3.13

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented May 31, 2025 •

Copy link
Copy Markdown
Member

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

… randbytes() (pythonGH-133658)

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

!buildbot 32

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit ce88d21 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134965%2Fmerge

The command will test the builders whose names match following regular expression: 32

The builders matched are:

  • wasm32-wasi Non-Debug PR
  • wasm32-wasi PR
  • wasm32 WASI 8Core PR
@serhiy-storchaka serhiy-storchaka added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 31, 2025
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit ce88d21 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134965%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 31, 2025
@serhiy-storchaka
serhiy-storchaka merged commit 3e1b8d6 into python:3.13 Jun 2, 2025
@serhiy-storchaka
serhiy-storchaka deleted the backport-68784fe-3.13 branch June 2, 2025 20:16
gpshead added a commit to gpshead/cpython that referenced this pull request Jun 10, 2025
…ions on getrandbits() and randbytes() (pythonGH-133658) (pythonGH-134965)"

This reverts commit 3e1b8d6.

This caused a regression in Python 3.13.4, getrandbit() no longer accepted an integer-like object via `__index__`.
@bedevere-app

bedevere-app Bot commented Jun 10, 2025

Copy link
Copy Markdown

GH-135327 is a backport of this pull request to the 3.13 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants