Skip to content

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

Closed
@barneygale

Description

@barneygale

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

Metadata

Metadata

Assignees

Labels

type-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions