FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-127073: Clear completion list when KeyboardInterrupt occurs in REPL by Natural-selection1 · Pull Request #128467 · python/cpython · GitHub

/ cpython Public

gh-127073: Clear completion list when KeyboardInterrupt occurs in REPL - #128467

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

gh-127073: Clear completion list when KeyboardInterrupt occurs in REPL#128467
Natural-selection1 wants to merge 7 commits into
python:mainfrom
Natural-selection1:clean_suggestion

Conversation

Copy link
Copy Markdown

Resolve #127073

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.denominator        int.imag               int.mro()              int.real
int.bit_count(         int.conjugate(         int.from_bytes(        int.is_integer(        int.numerator          int.to_bytes(
>>> int.

<Ctrl+C>

>>> int.
KeyboardInterrupt
>>> 

bedevere-app Bot commented Jan 4, 2025

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-selection1 and others added 2 commits January 5, 2025 12:12
Previously, the completion list would persist after a KeyboardInterrupt
was triggered. This change ensures the completion state is properly reset.
ZeroIntensity added the topic-repl Related to the interactive shell label Jan 6, 2025

ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A test in test_repl would be nice :)

See the devguide for writing tests.

@@ -0,0 +1,4 @@
Previously in the REPL, when a completion list was displayed and KeyboardInterrupt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Love the effort, but this is too long. Can we shorten this to a single sentence? (We don't need technical details, just what was fixed.)

ZeroIntensity added the needs backport to 3.13 bugs and security fixes label Jan 6, 2025

picnixz commented Jan 7, 2025
edited
Loading

Copy link
Copy Markdown
Member

@Natural-selection1 Please, do not merge main into your branch if there is no conflict to solve or if nothing has changed since the last commit. In addition, please consider addressing comments by ZeroIntensity first.

Copy link
Copy Markdown
Author

@Natural-selection1 Please, do not merge main into your branch if there is no conflict to solve or if nothing has changed since the last commit. In addition, please consider addressing comments by ZeroIntensity first.

Sorry for any inconvenience caused. As a newcomer contributing to a large project like CPython, I sincerely regret the issues. Regarding the previously mentioned problems, I am actively working on resolving them. As for the test cases that need to be written, I am making efforts, though it may take some time to complete. I will treat this experience as a valuable learning opportunity.

picnixz commented Jan 7, 2025
edited
Loading

Copy link
Copy Markdown
Member

No worries. For now, I'll mark your PR as a draft. Once you've added the tests and rewritten the NEWS entry, just convert it back to a "ready-for-review" PR.

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label May 6, 2026
serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
github-actions Bot removed the stale Stale PR or inactive for long period of time. label May 31, 2026
Natural-selection1 closed this by deleting the head repository Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes topic-repl Related to the interactive shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Python REPL double-prints completion suggestions

4 participants


Back | FazBrowse Home | New Git URL