◐ Shell
clean mode source ↗

Message 370357 - Python tracker

To review: Serhiy reported 3 'IDLE' bugs: tripled DeprecationWarning (now joined by SyntaxWarning), printing to console (if available) instead of Shell, and an exit exception.

1. Codeop generates the tripicates; #40807 will fix that.
2. PR-15311 prints warnings to Shell, but I held off  pending some fix.  3. The exception (a duplicate report) was fixed on #35623.
4. PR-15500 stopped turning a SyntaxWarning into a SyntaxError.

Additional issues, semi-independent.
5. REPL prints warning after code, IDLE before
6. REPL prints 1 line, IDLE 4, but this is related to Shell warnings going to the console.  IDLE should use 1 and highlight.
7. Should IDLE extend scope of deduplication?  Yes with 4 lines, maybe not with 1 line.
8. REPL partially deduplicates within compound statement; see #40807.