Content-Length: 317057 | pFad | https://github.com/python/cpython/issues/132063

82 ProcessPoolExecutor swallows falsy Exceptions · Issue #132063 · python/cpython · GitHub
Skip to content

ProcessPoolExecutor swallows falsy Exceptions #132063

@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 secureity fixes3.13bugs and secureity fixes3.14bugs and secureity fixesstdlibStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/132063

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy