You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is motivated by a discussion with @serhiy-storchaka on #122456. Pyrepl/code.InteractiveInterpreter does not handle exceptions at various points, see the linked commend for an example.
Directly after writing this, I also got the following traceback that I now can't reproduce, by pressing ctrl-r then searching for a string, and then pressing ctrl-c at somehow the wrong point:
This crashed pyrepl. I think it would be better if we printed the exception, but then actually stayed in pyrepl, to make sure we don't lose the repl state which might have been annoying to get to.
Another way to crash pyrepl, but not the classic repl is to close sys.stderr and then raising an exception.
We could make pyrepl less crash-prone that by adding an except BaseException around the pyrepl loop in run_multiline_interactive_console.
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
This issue is motivated by a discussion with @serhiy-storchaka on #122456. Pyrepl/
code.InteractiveInterpreter
does not handle exceptions at various points, see the linked commend for an example.Directly after writing this, I also got the following traceback that I now can't reproduce, by pressing ctrl-r then searching for a string, and then pressing ctrl-c at somehow the wrong point:
This crashed pyrepl. I think it would be better if we printed the exception, but then actually stayed in pyrepl, to make sure we don't lose the repl state which might have been annoying to get to.
Another way to crash pyrepl, but not the classic repl is to close
sys.stderr
and then raising an exception.We could make pyrepl less crash-prone that by adding an
except BaseException
around the pyrepl loop inrun_multiline_interactive_console
.Any opinions, @pablogsal, @ambv?
CPython versions tested on:
3.13, CPython main branch
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: