https://github.com/da-viper created https://github.com/llvm/llvm-project/pull/173379
readline.backend was added in Python 3.13 see https://docs.python.org/3/library/readline.html#readline.backend >From c2c8375c9f36ee6362867d685f648437e8b0cd2d Mon Sep 17 00:00:00 2001 From: Ebuka Ezike <[email protected]> Date: Tue, 23 Dec 2025 11:05:59 +0000 Subject: [PATCH] [lldb] Improve detection of the readline backend readline.backend was added in Python 3.13 --- lldb/source/Interpreter/embedded_interpreter.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lldb/source/Interpreter/embedded_interpreter.py b/lldb/source/Interpreter/embedded_interpreter.py index cdf166a4d1a23..42a9ab5fc367a 100644 --- a/lldb/source/Interpreter/embedded_interpreter.py +++ b/lldb/source/Interpreter/embedded_interpreter.py @@ -15,7 +15,13 @@ have_readline = False else: have_readline = True - if "libedit" in readline.__doc__: + + def is_libedit(): + if hasattr(readline, "backend"): + return readline.backend == "editline" + return "libedit" in getattr(readline, "__doc__", "") + + if is_libedit(): readline.parse_and_bind("bind ^I rl_complete") else: readline.parse_and_bind("tab: complete") _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
