gh-130472: Integrate fancycompleter with the new repl, to get colored tab completions#130473
gh-130472: Integrate fancycompleter with the new repl, to get colored tab completions#130473pablogsal merged 49 commits intopython:mainfrom
Conversation
|
Assuming the tests are going to pass (last famous words), this is ready to review.
Compared to the initial version, I'm now using /cc @ambv as I think he's the one responsible for themes. |
|
Also, I'm getting a warning from the doc builder but I'm not sure how to fix:
|
Yes, but it is not documented. You can add an exclamation mark at the start to remove the link. |
…y this fixes the failures on Android CI
…d color. This is both more robust and more correct
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
…vance, let's add a comment to explain why
7d2c790 to
9b9b37d
Compare
Keep pyrepl completion logic working on the uncolored completion text. The reader now strips ANSI escapes before comparing the typed stem, inserting a sole completion, computing the shared prefix, and filtering an open completion menu. This fixes colored completions that would stop refining correctly once more characters were typed. Restore readline's callable postfix behavior for attribute completions by routing single attribute matches through rlcompleter's callable postfix logic while keeping the full expr.attr stem for menu refinement. Global completion also treats soft keywords as keywords instead of trying to evaluate them. Avoid side effects while probing attribute values for coloring by not forcing property access and by preserving lazy module imports. Also make the fake color-sorting escape prefix round-trip cleanly once the match index grows past three digits. Only honor PYTHON_BASIC_COMPLETER when the environment is enabled, so pyrepl setup now respects -E / sys.flags.ignore_environment. Add regression tests for the reader behavior, callable attribute completion, property and lazy-import safety, large color-sort prefixes, and the -E setup path.
|
Thanks for the great work on this, @antocuni . I rebased the branch and added a handful of follow-up fixes around the fancycompleter integration, including some edge cases and extra regression coverage. This is in good shape now, and I’m planning to land it soon so it makes the next release. |


As the title says, this is (WIP) to integrate fancycompleter into the new REPL.