Python console: do not require output that looks like a traceback to be valid by birkenfeld · Pull Request #2410 · pygments/pygments

Hmm, seems like the alternate fix would be better then?

If I understand correctly, it means

diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py
index 6c89e6b5..eaaf6476 100644
--- a/pygments/lexers/python.py
+++ b/pygments/lexers/python.py
@@ -763,7 +763,8 @@ class PythonTracebackLexer(RegexLexer):
             (r'^([^:]+)(: )(.+)(\n)',
              bygroups(Generic.Error, Text, Name, Whitespace), '#pop'),
             (r'^([a-zA-Z_][\w.]*)(:?\n)',
-             bygroups(Generic.Error, Whitespace), '#pop')
+             bygroups(Generic.Error, Whitespace), '#pop'),
+            default('#pop'),
         ],
         'markers': [
             # Either `PEP 657 <https://www.python.org/dev/peps/pep-0657/>`

Right?