Description
Bug report
Bug description:
Python version: Python 3.14.0a7+ (heads/main-dirty:8d0e07eb899.
To reproduce type the following class definition in the REPL:
class C:
def
m
Then set the cursor to the space before m
and press backspace to correct the incorrect newline.
Behaviour: the REPL exits with an IndentationError
.
Typing backspace works correctly when the cursor is on m
.
The exit/crash does not happen in 3.14a7.
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
macOS
Activity
terryjreedy commentedon May 7, 2025
Win 10: with a space between the cursor and 'm', so 3 spaces to left of cursor
IndentationError: unindent does not match any outer indentation level
ronaldoussoren commentedon May 7, 2025
Full traceback:
StanFromIreland commentedon May 7, 2025
I can reproduce but with a varied traceback.
danielhollas commentedon May 7, 2025
cc @ambv based on the stacktrace it looks like it's coming from the new syntax highlighting code.
ambv commentedon May 7, 2025
Oof. OK, yes, indeed. Sorry about that omission.
pythongh-133541: Handle SyntaxError raised by the tokenizer on user i…
gh-133541: Handle SyntaxError raised by the tokenizer on user input (#…
pythongh-133541: Handle SyntaxError raised by the tokenizer on user i…
7 remaining items