mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-33692: pythoninfo detect libedit on Python 3.6 (GH-7293)
Check which readline implementation is used based on the readline docstring.
This commit is contained in:
		
							parent
							
								
									6e3ca645e7
								
							
						
					
					
						commit
						ef634b5b26
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -275,6 +275,14 @@ def format_attr(attr, value): | ||||||
|     copy_attributes(info_add, readline, 'readline.%s', attributes, |     copy_attributes(info_add, readline, 'readline.%s', attributes, | ||||||
|                     formatter=format_attr) |                     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): | def collect_gdb(info_add): | ||||||
|     import subprocess |     import subprocess | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner