← 返回首页
gh-118877: Fix AssertionError crash in pyrepl by danielhollas · Pull Request #118936 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-118877: Fix AssertionError crash in pyrepl#118936

Merged
ambv merged 2 commits into
python:mainfrom
danielhollas:fix-pyrepl-tab-up
May 20, 2024
Merged

gh-118877: Fix AssertionError crash in pyrepl#118936
ambv merged 2 commits into
python:mainfrom
danielhollas:fix-pyrepl-tab-up

Conversation

danielhollas commented May 11, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

A crash of the new pyrepl was triggered by pressing up arrow when tab completion menu was displayed. Fixes #118877

While this simple fix does the trick, as @lysnikolaou mentioned in a #118877 (comment), there are other issues with how arrows interact with tab completions menu, so a more holistic fix might be needed eventually.
I am hoping this is still useful to at least stop interpreter from crashing. Also the added test can serve is as a regression test.

(it took me quite a while to figure out how to write the test, suggestions how to improve it are welcome 🙏 )

A crash of the new pyrepl was triggered by pressing up arrow when tab completion menu was displayed.
Eclips4 added the topic-repl Related to the interactive shell label May 11, 2024
ambv added the skip news label May 20, 2024
ambv merged commit c0d81b2 into python:main May 20, 2024
danielhollas deleted the fix-pyrepl-tab-up branch May 20, 2024 19:03
lysnikolaou added the needs backport to 3.13 bugs and security fixes label May 21, 2024

Copy link
Copy Markdown

Thanks @danielhollas for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 21, 2024
(cherry picked from commit c0d81b2) Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>

bedevere-app Bot commented May 21, 2024

Copy link
Copy Markdown

GH-119363 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 21, 2024
lysnikolaou pushed a commit that referenced this pull request May 22, 2024
…9363) (cherry picked from commit c0d81b2) Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
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

skip news topic-repl Related to the interactive shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AssertionError occurs using 3.130b1 interactive mode when pressed tab and up arrow

4 participants

Footer

© 2026 GitHub, Inc.