gh-110332: Remove mentions of random.WichmannHill from test_zlib#110334
Merged
vstinner merged 1 commit intopython:mainfrom Oct 4, 2023
Merged
gh-110332: Remove mentions of random.WichmannHill from test_zlib#110334vstinner merged 1 commit intopython:mainfrom
random.WichmannHill from test_zlib#110334vstinner merged 1 commit intopython:mainfrom
Conversation
vstinner
reviewed
Oct 4, 2023
| gen = random | ||
| gen.seed(1) | ||
| data = gen.randbytes(17 * 1024) | ||
| data = random.randbytes(17 * 1024) |
Member
There was a problem hiding this comment.
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?
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
@vstinner I've recently checked that it is not possible to install anything below python3.7 on m2 #110013 (comment)
Contributor
Contributor
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Oct 4, 2023
…zlib` (pythonGH-110334) (cherry picked from commit e9f2352) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Oct 4, 2023
…zlib` (pythonGH-110334) (cherry picked from commit e9f2352) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
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. |
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this pull request
Sep 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #110171, I am looking through other usages of
Random.seedtest_zlibuses some very oldrandomAPI #110332