mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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:
parent
7e2d93f30b
commit
c6e614fd81
3 changed files with 92 additions and 156 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue