Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
gh-132063: ProcessPoolExecutor swallows falsy Exceptions#132129
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-132063: ProcessPoolExecutor swallows falsy Exceptions#132129
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Misc/NEWS.d/next/Library/2025-04-05-15-05-09.gh-issue-132063.KHnslU.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
I never sent my review.
Misc/NEWS.d/next/Library/2025-04-05-15-05-09.gh-issue-132063.KHnslU.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
YvesDup commentedApr 7, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
After more tests, I found that Line 1123 in255eb37
Line 1144 in255eb37
And falsey BaseExceptionGroup exception is ignored too.Line 1159 in255eb37
Should we open a new issue with these bugs or integrate them to this PR ? EDIT: please ignore this comment |
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2025-04-05-15-05-09.gh-issue-132063.KHnslU.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
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.
Some nits and LGTM.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
msg = 'boolbool' | ||
with self.assertRaisesRegex(FalseyBoolException, msg): | ||
self.executor.submit(raiser, FalseyBoolException, msg).result() |
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.
This is for a possible follow-up but this kind of call makes me wonder whether the base class shouldn't have somedef submit_and_fetch(self)
method that does this.
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.
Does this method return directy the result ?
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.
There is a follow-up with theTracebackException
class which swallows__cause__
and__context__
content of falsey exceptions.
I will post a new issue about this.
933c665
intopython:mainUh oh!
There was an error while loading.Please reload this page.
…alsey exceptions (pythonGH-132129)(cherry picked from commit933c665)Co-authored-by: Duprat <yduprat@gmail.com>
GH-132275 is a backport of this pull request to the3.13 branch. |
Uh oh!
There was an error while loading.Please reload this page.
ProcessPoolExecutor and ThreadPoolExecutor swallows falsy exception.
Fix tests about exception variable in 2 files of /Lib/concurrent/futures
Changes 2 tests as below:
Replace
if exception:
withif exception is not None: