Skip to content

Python 3.13: Pressing the Tab key while in the REPL prints 4 spaces instead of 1 tab (breaking backspace) #125923

@milosivanovic

Description

@milosivanovic

Bug report

Bug description:

Tested on 3.12:
In the <=3.12 Python REPL on Linux, I can press the tab key, and a tab character is printed in the console. I can then use the backspace key to undo that whole tab character.

Tested on 3.13:
In the 3.13 Python REPL on Linux, if I type a tab character, it seems to convert it to 4 spaces, and thus pressing the backspace key once only deletes 1/4 of the indentation.


This is either a bug, or if it's a feature, it should be configurable and without changing the sane defaults from <=3.12.
How can I get back to the <=3.12 behaviour?

CPython versions tested on:

3.12, 3.13

Operating systems tested on:

Linux, macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixestopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions