summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2020-05-07 14:56:01 (GMT)
committerGitHub <noreply@github.com>2020-05-07 14:56:01 (GMT)
commita1d9e0accd33af1d8e90fc48b34c13d7b07dcf57 (patch)
treeac78eeda72af62870e37c0611672383fc655fbe6 /Doc
parent8963a7f1f84a05412178b56629508b660d38861b (diff)
downloadcpython-a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57.zip
cpython-a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57.tar.gz
cpython-a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57.tar.bz2
bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)
(Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.) If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, __cause__, __context__, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately). This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to __cause__ on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original __cause__, __context__, and __traceback__ (since "pickle" does not preserve those). https://bugs.python.org/issue32604
Diffstat (limited to 'Doc')
0 files changed, 0 insertions, 0 deletions