gh-76785: Avoid Pickled TracebackException for Propagated Subinterpreter Exceptions (gh-113036)

We need the TracebackException of uncaught exceptions for a single purpose: the error display.  Thus we only need to pass the formatted error display between interpreters.  Passing a pickled TracebackException is overkill.
This commit is contained in:
Eric Snow 2023-12-12 17:31:30 -07:00 committed by GitHub
parent 7e2d93f30b
commit c6e614fd81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 92 additions and 156 deletions

View file

@ -56,7 +56,7 @@ class ExecFailure(RuntimeError):
def __str__(self):
try:
formatted = ''.join(self.excinfo.tbexc.format()).rstrip()
formatted = self.excinfo.errdisplay
except Exception:
return super().__str__()
else: