gh-132063: ProcessPoolExecutor swallows falsy Exceptions#132129
gh-132063: ProcessPoolExecutor swallows falsy Exceptions#132129picnixz merged 11 commits intopython:mainfrom
Conversation
Misc/NEWS.d/next/Library/2025-04-05-15-05-09.gh-issue-132063.KHnslU.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Library/2025-04-05-15-05-09.gh-issue-132063.KHnslU.rst
Outdated
Show resolved
Hide resolved
|
After more tests, I found that Line 1123 in 255eb37 Line 1144 in 255eb37 And falsey BaseExceptionGroup exception is ignored too.Line 1159 in 255eb37 Should we open a new issue with these bugs or integrate them to this PR ? EDIT: please ignore this comment |
Misc/NEWS.d/next/Library/2025-04-05-15-05-09.gh-issue-132063.KHnslU.rst
Outdated
Show resolved
Hide resolved
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>
|
|
||
| msg = 'boolbool' | ||
| with self.assertRaisesRegex(FalseyBoolException, msg): | ||
| self.executor.submit(raiser, FalseyBoolException, msg).result() |
There was a problem hiding this comment.
This is for a possible follow-up but this kind of call makes me wonder whether the base class shouldn't have some def submit_and_fetch(self) method that does this.
There was a problem hiding this comment.
Does this method return directy the result ?
There was a problem hiding this comment.
There is a follow-up with the TracebackExceptionclass which swallows __cause__ and __context__ content of falsey exceptions.
I will post a new issue about this.
…alsey exceptions (pythonGH-132129) (cherry picked from commit 933c665) Co-authored-by: Duprat <yduprat@gmail.com>
|
GH-132275 is a backport of this pull request to the 3.13 branch. |
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: