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

PyREPL: KeyboardInterrupt does not clear completion menu if it's already visible #119553

Closed
lysnikolaou opened this issue May 25, 2024 · 0 comments
Assignees
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@lysnikolaou
Copy link
Contributor

lysnikolaou commented May 25, 2024

Bug report

Bug description:

Pressing Ctrl-C (and emitting a KeyboardInterrupt) while the completion menu is visible (after having pressed Tab) does not clear it before the next line.

>>> import itertools
itertools.accumulate(                     itertools.groupby(                        
itertools.batched(                        itertools.islice(                         
itertools.chain(                          itertools.pairwise(                       
itertools.combinations(                   itertools.permutations(                   
itertools.combinations_with_replacement(  itertools.product(                        
itertools.compress(                       itertools.repeat(                         
itertools.count(                          itertools.starmap(                        
itertools.cycle(                          itertools.takewhile(                      
itertools.dropwhile(                      itertools.tee(                            
itertools.filterfalse(                    itertools.zip_longest(                    
>>> itertools.

KeyboardInterrupt
itertools.accumulate(                     itertools.groupby(                        
itertools.batched(                        itertools.islice(                         
itertools.chain(                          itertools.pairwise(                       
itertools.combinations(                   itertools.permutations(                   
itertools.combinations_with_replacement(  itertools.product(                        
itertools.compress(                       itertools.repeat(                         
itertools.count(                          itertools.starmap(                        
itertools.cycle(                          itertools.takewhile(                      
itertools.dropwhile(                      itertools.tee(                            
itertools.filterfalse(                    itertools.zip_longest(                    
>>> 

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

@lysnikolaou lysnikolaou added type-bug An unexpected behavior, bug, or error topic-repl Related to the interactive shell labels May 25, 2024
@lysnikolaou lysnikolaou self-assigned this May 25, 2024
@AlexWaygood AlexWaygood changed the title PyREPL: KeyboardInterrupt does not clear comletion menu if it's already visible PyREPL: KeyboardInterrupt does not clear completion menu if it's already visible May 25, 2024
@AlexWaygood AlexWaygood added 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels May 25, 2024
lysnikolaou added a commit to lysnikolaou/cpython that referenced this issue May 30, 2024
Also, do not print extra newline on before KeyboardInterrupt.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 4, 2024
(cherry picked from commit 010ea93)

Co-authored-by: Lysandros Nikolaou <[email protected]>
lysnikolaou added a commit that referenced this issue Jun 4, 2024
(cherry picked from commit 010ea93)

Co-authored-by: Lysandros Nikolaou <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
lysnikolaou added a commit to lysnikolaou/cpython that referenced this issue Jun 4, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 4, 2024
…block (pythonGH-120075)

(cherry picked from commit 69b3e8e)

Co-authored-by: Lysandros Nikolaou <[email protected]>
lysnikolaou added a commit that referenced this issue Jun 4, 2024
… block (GH-120075) (#120076)

(cherry picked from commit 69b3e8e)

Co-authored-by: Lysandros Nikolaou <[email protected]>
barneygale pushed a commit to barneygale/cpython that referenced this issue Jun 5, 2024
barneygale pushed a commit to barneygale/cpython that referenced this issue Jun 5, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants