Skip to content

KeyboardInterrupt during paste breaks the new REPL #121295

Description

@treyhunner

Bug report

Bug description:

To reproduce, type f = """ then paste a giant block of text (I pasted the text of Frankenstein) then press Ctrl+C immediately (while the text is being pasted).

>>> f = """
<GIANT BLOCK OF TEXT>

Then hit Ctrl+C

After this the REPL will enter a state where it seems unable to end a block of code. The prompt changes to ... and only Ctrl+C will quit out of the block.

Also nothing is displayed while typing until Enter is pressed.

Here's an animation showing the issue:

666571

This issue is also reproducible on the main branch.

I checked out commit 32a0fab and I could not reproduce this, so the issue arose sometime after #120253 was merged.

CPython versions tested on:

3.13, CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. pygeek commented on Jul 3, 2024

    @pygeek
    Contributor

    Which linux distro and version are you using? I was unable to reproduce on macOS 14.5 so the issue may be Linux specific.

  2. treyhunner commented on Jul 3, 2024

    @treyhunner
    MemberAuthor

    Which linux distro and version are you using? I was unable to reproduce on macOS 14.5 so the issue may be Linux specific.

    I am running on Ubuntu Linux 22.04.4. I was able to reproduce the problem in both Gnome Terminal and in XTerm on my machine.

  3. mgmacias95 commented on Jul 13, 2024

    @mgmacias95
    Contributor

    I am working on this :)

  4. added a commit that references this issue on Jul 15, 2024
  5. added a commit that references this issue on Jul 15, 2024
  6. added a commit that references this issue on Jul 16, 2024
  7. ambv commented on Jul 16, 2024

    @ambv
    Contributor

    Thanks for the fix, Marta! ⚡️⚡️⚡️

  8. added a commit that references this issue on Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-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