Skip to content
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

New Python REPL double-prints completion suggestions #127073

Open
ucodery opened this issue Nov 20, 2024 · 0 comments
Open

New Python REPL double-prints completion suggestions #127073

ucodery opened this issue Nov 20, 2024 · 0 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

@ucodery
Copy link
Contributor

ucodery commented Nov 20, 2024

Bug report

Bug description:

If a keyboard interrupt is given while TAB autocomplete suggestions are being displayed, they are re-printed also below the last line, and continue to be re-printed as long as new keyboard interrupts are given.

after the keystrokes int.<TAB><TAB>

int.as_integer_ratio(  int.bit_length(        int.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>> int.

then <CTRL-C>

int.as_integer_ratio(  int.bit_length(        int.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>> int.
KeyboardInterrupt
int.as_integer_ratio(  int.bit_length(        int.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>>

another <CTRL-C>

int.as_integer_ratio(  int.bit_length(        int.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>> int.
KeyboardInterrupt
int.as_integer_ratio(  int.bit_length(        int.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>>
KeyboardInterrupt
int.as_integer_ratio(  int.bit_length(        int.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>>

<ENTER> makes the last set of printed suggestions disappear, as does typing any printing characters.

int.as_integer_ratio(  int.bit_length(        int.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>> int.
KeyboardInterrupt
int.as_integer_ratio(  int.bit_length(        int.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>>
KeyboardInterrupt
>>>
>>>

CPython versions tested on:

3.14

Operating systems tested on:

macOS

@ucodery ucodery added the type-bug An unexpected behavior, bug, or error label Nov 20, 2024
@AlexWaygood AlexWaygood added the topic-repl Related to the interactive shell label Nov 21, 2024
@picnixz picnixz added the stdlib Python modules in the Lib dir label Nov 21, 2024
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