Skip to content

Commit

Permalink
Don't handle sigint when prompting for input.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanslenders committed Jun 7, 2022
1 parent 4bd161a commit 89a177c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions IPython/terminal/interactiveshell.py
Expand Up @@ -610,6 +610,9 @@ def prompt_for_code(self):
with patch_stdout(raw=True):
text = self.pt_app.prompt(
default=default,
# Don't set sigint signal handlers.
# See: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1576
handle_sigint=False,
**self._extra_prompt_options())
finally:
# Restore the original event loop.
Expand Down

0 comments on commit 89a177c

Please sign in to comment.