cpython/Lib/test/test_pyrepl
Pablo Galindo Salgado f8293faf37
gh-130472: Remove readline-only hacks from PyREPL completions (#148161)
PyREPL was still carrying over two readline-specific tricks from the
fancy completer: a synthetic CSI prefix to influence sorting and a fake
blank completion entry to suppress readline's prefix insertion. Those
workarounds are not appropriate in PyREPL because the reader already
owns completion ordering and menu rendering, so the fake entries leaked
into the UI as real terminal attributes and empty menu cells.

Sort completion candidates in ReadlineAlikeReader by their visible text
with stripcolor(), and let the fancy completer return only real matches.
That keeps colored completions stable without emitting bogus escape
sequences, removes the empty completion slot, and adds regression tests
for both the low-level completer output and the reader integration.
2026-04-06 14:57:25 +00:00
..
__init__.py gh-145035: Allows removing the _pyrepl module to completely disable the modern REPL (GH-145159) 2026-03-10 14:58:32 +01:00
__main__.py
support.py gh-133346: Make theming support in _colorize extensible (GH-133347) 2025-05-05 23:45:25 +02:00
test_eventqueue.py gh-135621: Remove dependency on curses from PyREPL (GH-136758) 2025-07-21 11:57:34 +02:00
test_fancycompleter.py gh-130472: Remove readline-only hacks from PyREPL completions (#148161) 2026-04-06 14:57:25 +00:00
test_input.py
test_interact.py gh-131927: Do not emit PEP 765 warnings in ast.parse() (GH-139642) 2025-10-30 13:00:42 +02:00
test_keymap.py
test_pyrepl.py gh-130472: Remove readline-only hacks from PyREPL completions (#148161) 2026-04-06 14:57:25 +00:00
test_reader.py gh-138239: Fix incorrect highlighting of "type" in type statements in the REPL (GH-138241) 2025-09-15 18:21:41 +02:00
test_terminfo.py gh-135621: Remove dependency on curses from PyREPL (GH-136758) 2025-07-21 11:57:34 +02:00
test_unix_console.py gh-135329: Remove flaky test_repl_eio test (gh-145932) 2026-03-16 11:08:07 -04:00
test_utils.py gh-142349: Implement PEP 810 - Explicit lazy imports (#142351) 2026-02-12 00:15:33 +00:00
test_windows_console.py gh-132888: Fix Windows API error checking in pyrepl.windows_console (#144248) 2026-02-03 13:25:29 +01:00