Spyder IPython console Ctrl+C and Run‑command timeout: interaction and precedence
0 reputation · 19 Jan 2020, 20:44 UTC
When executing a Python script via Spyder’s Run command, the IDE can enforce an execution timeout (Preferences → General → Advanced) and also respond to user‑initiated cancellation such as pressing Ctrl+C in the IPython console or clicking the Stop toolbar button. The goal is to clarify whether these two mechanisms operate independently, whether one takes precedence over the other, and what state the kernel or subprocess is left in when both are triggered.
Consider the constraints that timeout enforcement is only available in Spyder 5.0 and later, that signal delivery differs on Windows (CTRL_BREAK_EVENT), and that killing a subprocess may leave behind child processes spawned by the script. Under these conditions, it is unclear how Spyder resolves concurrent cancellation requests and whether any cleanup guarantees are provided.
What happens if a user presses Ctrl+C while a timeout is counting down? Does the Stop button override an active timeout, or does the timeout abort the Stop request? Does Spyder guarantee that no orphaned processes remain when both cancellation paths are invoked?