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
More generally, the issue happens with all exceptions raised by other threads.
Run the code below and interrupt with ctrl+c.
# If part of a file, potentially more code before the loop. Traceback says -1 regardless.foriinrange(30000000):
ifnoti%1000000:
pass# Or any other operation here that is faster than iterating a million i values.
The issue persists whether running from the shell or as a file or even using exec. It works the same inside functions/methods. It exists in 3.11 and 3.12 but not 3.10, across Windows and Linux.
CPython versions tested on: 3.10.6 (no issue), 3.11.1 (issue), 3.11.4 (issue), 3.12.0rc1 (issue)
Operating system and architecture: Windows 10 and Ubuntu 22.04.2 LTS (WSL)
More generally, the issue happens with all exceptions raised by other threads.
Run the code below and interrupt with ctrl+c.
With the following traceback:
The issue disappears as soon as we add just a bit more to the loop
The issue persists whether running from the shell or as a file or even using
exec. It works the same inside functions/methods. It exists in 3.11 and 3.12 but not 3.10, across Windows and Linux.Linked PRs