-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Fix documentation #13721
Fix documentation #13721
Conversation
Based on the source code (https://github.com/python/cpython/blob/4a686504eb2bbf69adf78077458508a7ba131667/Lib/multiprocessing/pool.py#L755), AsyncResult.successful() raises a ValueError, not an AssertionError.
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 we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
I'm not a core-dev but it looks good to me. I don't know if it is required to open an issue on the tracker. @csabella what's the behavior in this case? Thank you and sorry for the mention! |
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.
LGTM. It seems similar changes were done in bd73e72 to change assert statements and use proper exceptions and messages though docs were not updated. Thanks.
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 a versionchanged
directive along with this change since it was changed in 3.7 and above with versions below 3.7 raising AssertionError
and it's clarified better that it is 3.7+ only change.
Add a `versionchanged` directive to specify that change from an `AssertionError` to a `ValueError` exception is a 3.7+ only change.
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.
LGTM.
I'd like to postpone the merging until "Backport to 3.8" github label is added.
Sorry, I can't merge this PR. Reason: |
Thanks @bentyeh for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-13836 is a backport of this pull request to the 3.8 branch. |
Based on the source code https://github.com/python/cpython/blob/4a686504eb2bbf69adf78077458508a7ba131667/Lib/multiprocessing/pool.pyGH-L755 AsyncResult.successful() raises a ValueError, not an AssertionError. (cherry picked from commit d4cf099) Co-authored-by: Benjamin Yeh <bentyeh@users.noreply.github.com>
Based on the source code https://github.com/python/cpython/blob/4a686504eb2bbf69adf78077458508a7ba131667/Lib/multiprocessing/pool.py#L755 AsyncResult.successful() raises a ValueError, not an AssertionError.
Based on the source code
cpython/Lib/multiprocessing/pool.py
Line 755 in 4a68650