Skip to content

REPL: Ctrl-R and arrow key trips assertion #118682

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

Closed
barneygale opened this issue May 7, 2024 · 2 comments
Closed

REPL: Ctrl-R and arrow key trips assertion #118682

barneygale opened this issue May 7, 2024 · 2 comments
Assignees
Labels
type-bug An unexpected behavior, bug, or error

Comments

@barneygale
Copy link
Contributor

barneygale commented May 7, 2024

Bug report

Seen in main / b4bdf83 on Linux

  1. Open the Python REPL
  2. Press Ctrl-R to pull up the (r-search ) prompt
  3. Press any arrow key
(r-search `') Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/barney/projects/cpython/Lib/_pyrepl/__main__.py", line 47, in <module>
    interactive_console()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/home/barney/projects/cpython/Lib/_pyrepl/__main__.py", line 44, in interactive_console
    return run_interactive(mainmodule)
  File "/home/barney/projects/cpython/Lib/_pyrepl/simple_interact.py", line 140, in run_multiline_interactive_console
    statement = multiline_input(more_lines, ps1, ps2)
  File "/home/barney/projects/cpython/Lib/_pyrepl/readline.py", line 301, in multiline_input
    return reader.readline()
           ~~~~~~~~~~~~~~~^^
  File "/home/barney/projects/cpython/Lib/_pyrepl/reader.py", line 646, in readline
    self.handle1()
    ~~~~~~~~~~~~^^
  File "/home/barney/projects/cpython/Lib/_pyrepl/reader.py", line 629, in handle1
    self.do_cmd(cmd)
    ~~~~~~~~~~~^^^^^
  File "/home/barney/projects/cpython/Lib/_pyrepl/reader.py", line 570, in do_cmd
    assert isinstance(cmd[0], str)
           ~~~~~~~~~~^^^^^^^^^^^^^
AssertionError

Linked PRs

@barneygale barneygale added the type-bug An unexpected behavior, bug, or error label May 7, 2024
@savannahostrowski
Copy link
Member

savannahostrowski commented May 7, 2024

I can also repro this on an M3 Mac, in case that's helpful.

@lysnikolaou
Copy link
Member

Fixed in #118709.

SonicField pushed a commit to SonicField/cpython that referenced this issue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants