Repository navigation
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Here's the problematic code:
Lines 513 to 525 in 1465386
| # Try 17K of data | |
| # generate random data stream | |
| try: | |
| # In 2.3 and later, WichmannHill is the RNG of the bug report | |
| gen = random.WichmannHill() | |
| except AttributeError: | |
| try: | |
| # 2.2 called it Random | |
| gen = random.Random() | |
| except AttributeError: | |
| # others might simply have a single RNG | |
| gen = random | |
| gen.seed(1) |
It always fails with AttributeError, because random.WichmannHill() does not exist.
This is some old compatibility class that was removed a long time ago:
The attributes random.whseed and random.__whseed have no meaning for
the new generator. Code using these attributes should switch to a
new class, random.WichmannHill which is provided for backward
compatibility and to make an alternate generator available.
So, I propose to simplify this test.
Linked PRs
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
pythongh-110332: Remove mentions of `random.WichmannHill` from `test_…
pythongh-110332: Remove mentions of `random.WichmannHill` from `test_…
gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` (#…
pythongh-110332: Remove mentions of `random.WichmannHill` from `test_…
pythongh-110332: Remove mentions of `random.WichmannHill` from `test_…
[3.11] gh-110332: Remove mentions of `random.WichmannHill` from `test…
[3.12] gh-110332: Remove mentions of `random.WichmannHill` from `test…
AlexWaygood commentedon Oct 4, 2023
Thanks!
pythongh-110332: Remove mentions of `random.WichmannHill` from `test_…