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
{{ message }}
Repository navigation
New REPL crash (and terminal display issues) after a breakpoint and by sending Ctrl + D input #129614
Is Ctrl+C a reasonable way to clear the line? pdb sets up a signal handler for SIGINT (aka Ctrl+C) so users can stop the program with Ctrl+C. I think it conflicts with whatever REPL does. You probably can reproduce this with any code that sets up signal.signal(signal.SIGINT, some_function).
So my question would be - is this even a bug? If the user code sets up a handler for SIGINT which conflicts with the current REPL, whose fault it is?
If we consider this a bug, is it a bug for REPL or pdb? Should REPL behave normal when SIGINT is set (to anything arbitrary), or pdb should not do something that REPL dislikes, even though the user can do the exact same thing?
I mean we can alleviate this by asking pdb to reset the sigint handler in inline mode - but that's actually a behavioral change. It is kind of reasonable, but not backward compatible.
I'm not an expert on REPL and we need the expertise in that area.
Activity
ZeroIntensity commentedon Feb 4, 2025
cc @gaogaotiantian
gaogaotiantian commentedon Feb 4, 2025
Is Ctrl+C a reasonable way to clear the line?
pdbsets up a signal handler forSIGINT(aka Ctrl+C) so users can stop the program with Ctrl+C. I think it conflicts with whatever REPL does. You probably can reproduce this with any code that sets upsignal.signal(signal.SIGINT, some_function).So my question would be - is this even a bug? If the user code sets up a handler for
SIGINTwhich conflicts with the current REPL, whose fault it is?If we consider this a bug, is it a bug for REPL or
pdb? Should REPL behave normal whenSIGINTis set (to anything arbitrary), orpdbshould not do something that REPL dislikes, even though the user can do the exact same thing?I mean we can alleviate this by asking
pdbto reset the sigint handler ininlinemode - but that's actually a behavioral change. It is kind of reasonable, but not backward compatible.I'm not an expert on REPL and we need the expertise in that area.