mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	[3.13] gh-111201: Remove readline dependency from the PyREPL (GH-119262) (#119403)
(cherry picked from commit 561ff1fa71)
			
			
This commit is contained in:
		
							parent
							
								
									721459831a
								
							
						
					
					
						commit
						ac9163637b
					
				
					 3 changed files with 3 additions and 3 deletions
				
			
		|  | @ -31,9 +31,9 @@ | |||
| from dataclasses import dataclass, field | ||||
| 
 | ||||
| import os | ||||
| import readline | ||||
| from site import gethistoryfile   # type: ignore[attr-defined] | ||||
| import sys | ||||
| from rlcompleter import Completer as RLCompleter | ||||
| 
 | ||||
| from . import commands, historical_reader | ||||
| from .completing_reader import CompletingReader | ||||
|  | @ -81,7 +81,7 @@ | |||
| 
 | ||||
| @dataclass | ||||
| class ReadlineConfig: | ||||
|     readline_completer: Completer | None = readline.get_completer() | ||||
|     readline_completer: Completer | None = RLCompleter().complete | ||||
|     completer_delims: frozenset[str] = frozenset(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?") | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -7,7 +7,6 @@ | |||
| # option.  Additionally, we need to attempt to import curses and readline. | ||||
| requires("curses") | ||||
| curses = import_module("curses") | ||||
| readline = import_module("readline") | ||||
| 
 | ||||
| 
 | ||||
| def load_tests(*args): | ||||
|  |  | |||
|  | @ -0,0 +1 @@ | |||
| Remove dependency to :mod:`readline` from the new Python REPL. | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lysandros Nikolaou
						Lysandros Nikolaou