Skip to content

gh-127073: Clear completion list when KeyboardInterrupt occurs - #128442

Closed
Natural-selection1 wants to merge 2 commits into
python:mainfrom
Natural-selection1:clean_suggestion
Closed

gh-127073: Clear completion list when KeyboardInterrupt occurs#128442
Natural-selection1 wants to merge 2 commits into
python:mainfrom
Natural-selection1:clean_suggestion

Conversation

@Natural-selection1

@Natural-selection1Natural-selection1 commented Jan 3, 2025

Copy link
Copy Markdown

Closes 127073

Issue: #127073

Previous behavior:

  • The completion list persisted after KeyboardInterrupt and always there.

int.<TAB><TAB>

int.as_integer_ratio( int.bit_length( int.denominatorint.imagint.mro() int.realint.bit_count( int.conjugate( int.from_bytes( int.is_integer( int.numeratorint.to_bytes(
>>>int.

<Ctrl+C>

int.as_integer_ratio( int.bit_length( int.denominatorint.imagint.mro() int.realint.bit_count( int.conjugate( int.from_bytes( int.is_integer( int.numeratorint.to_bytes(
>>>int.
KeyboardInterruptint.as_integer_ratio( int.bit_length( int.denominatorint.imagint.mro() int.realint.bit_count( int.conjugate( int.from_bytes( int.is_integer( int.numeratorint.to_bytes(
>>>

<Ctrl+C> again

int.as_integer_ratio( int.bit_length( int.denominatorint.imagint.mro() int.realint.bit_count( int.conjugate( int.from_bytes( int.is_integer( int.numeratorint.to_bytes(
>>>int.
KeyboardInterruptint.as_integer_ratio( int.bit_length( int.denominatorint.imagint.mro() int.realint.bit_count( int.conjugate( int.from_bytes( int.is_integer( int.numeratorint.to_bytes(
>>>KeyboardInterruptint.as_integer_ratio( int.bit_length( int.denominatorint.imagint.mro() int.realint.bit_count( int.conjugate( int.from_bytes( int.is_integer( int.numeratorint.to_bytes(
>>>

New behavior:

  • The completion list is properly cleared on KeyboardInterrupt just consistent with the behavior of other errors

int.<TAB><TAB>

int.as_integer_ratio( int.bit_length( int.denominatorint.imagint.mro() int.realint.bit_count( int.conjugate( int.from_bytes( int.is_integer( int.numeratorint.to_bytes(
>>>int.

<Ctrl+C>

>>>int.
KeyboardInterrupt>>>

@ghost

ghost commented Jan 3, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Natural-selection1and others added 2 commits January 3, 2025 22:52
Previously, the completion list would persist after a KeyboardInterrupt
was triggered. This change ensures the completion state is properly reset.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Natural-selection1