Skip to content

ProcessPoolExecutor swallows falsy Exceptions #132063

Closed
@graingert

Description

@graingert

Bug report

Bug description:

import sys import concurrent.futures class MyException(Exception): def __bool__(self): return False def raiser(): raise MyException("foo") def main(): with concurrent.futures.ProcessPoolExecutor() as p: print(p.submit(raiser).result()) if __name__ == "__main__": sys.exit(main())

This program prints None, but should fail and print a traceback

CPython versions tested on:

CPython main branch, 3.14, 3.13, 3.12, 3.11, 3.10, 3.9

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtopic-multiprocessingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions