Skip to content

Extra Spaces Added When Pasting Multi-Line Text in Python 3.13.1Β #129076

@maoraver

Description

@maoraver

Bug report

Bug description:

When pasting multi-line text into the Python terminal(using CMD or PowerShell) in Python 3.13.1, extra spaces are being added at the beginning of each line. This issue is specific to Python 3.13.1 and does not occur in earlier versions (e.g., Python 3.9, checked with a friend).

For example, consider the following text copied and pasted into the REPL:
(take the text from here)

print("""
    _    _
   | |  | |
   | |__| | __ _ _ __   __ _ _ __ ___   __ _ _ __
   |  __  |/ _` | '_ \ / _` | '_ ` _ \ / _` | '_ \
   | |  | | (_| | | | | (_| | | | | | | (_| | | | |
   |_|  |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|
                        __/ |
                       |___/
""")

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-windowsinvalidstdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shell

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions