diff options
| author | Victor Stinner <vstinner@redhat.com> | 2018-06-01 09:04:29 (GMT) | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-01 09:04:29 (GMT) | 
| commit | ef634b5b26f14d942768069fa23f9791a06ff37e (patch) | |
| tree | 31c846188f596e936b8a216e06b359c6bc8a06e8 /Lib | |
| parent | 6e3ca645e71dd021fead5a70dc06d9b663612e3a (diff) | |
| download | cpython-ef634b5b26f14d942768069fa23f9791a06ff37e.zip cpython-ef634b5b26f14d942768069fa23f9791a06ff37e.tar.gz cpython-ef634b5b26f14d942768069fa23f9791a06ff37e.tar.bz2  | |
bpo-33692: pythoninfo detect libedit on Python 3.6 (GH-7293)
Check which readline implementation is used based on the readline
docstring.
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/test/pythoninfo.py | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 776f03f..9242a36 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -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  | 
