bpo-29960 _random.Random state corrupted on exception.#953
bpo-29960 _random.Random state corrupted on exception.#953bladebryan wants to merge 19 commits intopython:masterfrom bladebryan:randrestore
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
|
@bladebryan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rhettinger, @serhiy-storchaka and @benjaminp to be potential reviewers. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Please add an entry in Misc/NEWS.
Modules/_randommodule.c
Outdated
| return NULL; | ||
| } | ||
| self->index = (int)index; | ||
| for (i=0; i<N; i++) |
There was a problem hiding this comment.
Add spaces around operators = and <.
Misc/NEWS
Outdated
| ----------------- | ||
|
|
||
| - bpo-29960: Preserve generator state when _random.Random.setstate() | ||
| raises an exception. |
There was a problem hiding this comment.
Add "Patch by $yourname." Use two spaces between sentences.
|
The 14 files changed seems wrong. I think a lot of other stuff may have inadvertently been included. |
|
I must have done something wrong in rebase. This pull request has gotten too messy, so I'll close it and create another. |
Changes the _random.Random.setstate() function so that if it raises an exception the state of the generator is unchanged.