-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-29960 _random.Random state corrupted on exception. #953
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
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.