cpython/Lib/_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-111201: A new Python REPL (GH-111567) 2024-05-05 21:32:23 +02:00
__main__.py gh-129098: avoid using content of _pyrepl/__main__.py when reporting tracebacks (#130721) 2025-04-20 18:24:30 +01:00
_module_completer.py gh-140870: PyREPL auto-complete module attributes in import statements (#140871) 2026-04-05 19:10:59 +00:00
_threading_handler.py gh-120221: Support KeyboardInterrupt in asyncio REPL (#123795) 2024-09-06 21:28:29 +02:00
base_eventqueue.py Bump mypy to 1.16.1 (#135720) 2025-06-23 15:29:30 +03:00
commands.py gh-133400: Fixed Ctrl+D (^D) behavior in :mod:_pyrepl module (GH-133883) 2025-10-09 16:16:48 +02:00
completing_reader.py gh-140870: PyREPL auto-complete module attributes in import statements (#140871) 2026-04-05 19:10:59 +00:00
console.py gh-72327: Suggest using system terminal for pip install in PyREPL (#136328) 2025-07-15 14:25:07 +00:00
fancy_termios.py gh-134466: Don't run when termios is inaccessible (GH-138911) 2025-09-17 12:59:49 +02:00
fancycompleter.py gh-130472: Remove readline-only hacks from PyREPL completions (#148161) 2026-04-06 14:57:25 +00:00
historical_reader.py gh-145394: Remove duplicated isearch_add_character in _pyrepl/historical_reader.py (#145396) 2026-03-19 16:38:01 +05:30
input.py Improve pyrepl type-annotation coverage (#119081) 2024-05-17 06:13:24 -04:00
keymap.py Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
main.py gh-127960 Fix the REPL to set the correct namespace by setting the correct __main__ module (gh-134275) 2025-05-22 02:18:00 +02:00
mypy.ini gh-131507: Add support for syntax highlighting in PyREPL (GH-133247) 2025-05-02 20:22:31 +02:00
pager.py _pyrepl/pager.py: call less with --clear-screen (#146382) 2026-03-28 17:23:58 +00:00
reader.py gh-140870: PyREPL auto-complete module attributes in import statements (#140871) 2026-04-05 19:10:59 +00:00
readline.py gh-130472: Remove readline-only hacks from PyREPL completions (#148161) 2026-04-06 14:57:25 +00:00
simple_interact.py gh-136924: Suspend REPL colorizing when in a REPL interactive command (GH-136926) 2026-01-03 14:35:34 +01:00
terminfo.py gh-135621: Simplify TermInfo (GH-136916) 2025-07-21 13:06:42 +02:00
trace.py gh-124621: Emscripten: Support pyrepl in browser (GH-136931) 2025-07-22 12:13:38 +02:00
types.py gh-140870: PyREPL auto-complete module attributes in import statements (#140871) 2026-04-05 19:10:59 +00:00
unix_console.py gh-128067: Fix pyrepl overriding printed output without newlines (#138732) 2026-01-02 14:04:37 +01:00
unix_eventqueue.py gh-135621: Remove dependency on curses from PyREPL (GH-136758) 2025-07-21 11:57:34 +02:00
utils.py gh-139003: Use frozenset for module level attributes in _pyrepl.utils (#139004) 2026-03-28 20:21:19 +00:00
windows_console.py gh-140131: Fix REPL cursor position on Windows when module completion suggestion line hits console width (GH-140333) 2026-03-12 16:59:43 +01:00
windows_eventqueue.py gh-124096: Enable REPL virtual terminal support on Windows (#124119) 2025-02-23 20:30:33 +01:00