Skip to content

Auto-indentation in python shell breaks copy-paste #132910

@tkreuzer

Description

@tkreuzer

Bug report

Bug description:

>>> def foo(x):
>>>         y = x + 1
>>>             z = 2 * y

The auto-indent feature in python 3.13.x shell breaks copy-paste of code on Windows.
Expected behavior: Copying properly formatted python code and pasting it into the shell works
Observed behavior: The auto-indenter adds additional indentation to every single line, effectively doubling the desired indentation, thus breaking the code

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesOS-windowsstdlibStandard Library Python modules in the Lib/ directorytopic-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