Commit 9994eff1 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-33692: pythoninfo detect libedit on Python 2.7 (#7246)

Check which readline implementation is used based on the readline
docstring.
parent 823c295e
......@@ -275,6 +275,14 @@ def collect_readline(info_add):
copy_attributes(info_add, readline, 'readline.%s', attributes,
formatter=format_attr)
if not hasattr(readline, "_READLINE_LIBRARY_VERSION"):
# _READLINE_LIBRARY_VERSION has been added to CPython 3.7
doc = getattr(readline, '__doc__', '')
if 'libedit readline' in doc:
info_add('readline.library', 'libedit readline')
elif 'GNU readline' in doc:
info_add('readline.library', 'GNU readline')
def collect_gdb(info_add):
import subprocess
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment