Skip to content

Ctrl+Alt+L is broken after upgrading to Python 3.13 #134746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danielzgtg opened this issue May 26, 2025 · 2 comments
Open

Ctrl+Alt+L is broken after upgrading to Python 3.13 #134746

danielzgtg opened this issue May 26, 2025 · 2 comments
Labels
stdlib Python modules in the Lib dir topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@danielzgtg
Copy link

danielzgtg commented May 26, 2025

Bug report

Bug description:

  1. Open python3 for the REPL
  2. Run anything like 1+2
  3. Press Ctrl + Alt + L

Expended behavior from Python 3.12

The screen should be cleared with only ">>>" remaining, and the scrollbar should indicate no history.

Actual behavior on Python 3.13+

Nothing happens, and the "3" is still there.

Tested on Python 3.13.3 (main, Apr 8 2025, 19:55:40) [GCC 14.2.0] on linux and Python 3.15.0a0 (heads/main:57fef27cfc, May 25 2025, 13:55:21) [GCC 14.2.0] on linux

Note that Ctrl + L still works, but it is designed to not clear history.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

@danielzgtg danielzgtg added the type-bug An unexpected behavior, bug, or error label May 26, 2025
@picnixz picnixz added stdlib Python modules in the Lib dir topic-repl Related to the interactive shell labels May 26, 2025
donBarbos added a commit to donBarbos/cpython that referenced this issue May 28, 2025
@donBarbos

This comment has been minimized.

@danielzgtg
Copy link
Author

danielzgtg commented May 28, 2025

@donBarbos No, it should not only clear the screen. See Python 3.12 and man bash:

clear-display (M-C-l)

Clear the screen and, if possible, the terminal's scrollback buffer, then redraw the current line, leaving the current line at the top of the screen.

clear-screen (C-l)

Clear the screen, then redraw the current line, leaving the current line at the top of the screen. With an argument, refresh the current line without clearing the screen.

The behavior of these two should be different. It was a bug in Python 3.12 and below that made them the same (perhaps it's C-l that needs fixing). I'm only asking for M-C-l because I'm used to it working before. If these are going to be the same, we can support only C-l the way Node.js and PowerShell do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants