-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-110332: Remove mentions of random.WichmannHill
from test_zlib
#110334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
gen = random | ||
gen.seed(1) | ||
data = gen.randbytes(17 * 1024) | ||
data = random.randbytes(17 * 1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of generating random bytes at each run, would it make sense to install Python 2.3, generate these 17 KiB, save them in a file, and use the file in this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will take about 500 lines for hex-encoded or base64-encoded data (more if use the bytes literal). Generating 17KB of random data takes less than 0.0001 sec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vstinner I've recently checked that it is not possible to install anything below python3.7 on m2 #110013 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch.
…zlib` (pythonGH-110334) (cherry picked from commit e9f2352) Co-authored-by: Nikita Sobolev <[email protected]>
…zlib` (pythonGH-110334) (cherry picked from commit e9f2352) Co-authored-by: Nikita Sobolev <[email protected]>
GH-110348 is a backport of this pull request to the 3.11 branch. |
GH-110349 is a backport of this pull request to the 3.12 branch. |
Related to #110171, I am looking through other usages of
Random.seed
test_zlib
uses some very oldrandom
API #110332