gh-111201: Remove readline dependency from the PyREPL (#119262)

This commit is contained in:
Lysandros Nikolaou 2024-05-21 16:30:45 -04:00 committed by GitHub
parent e3ed574f6a
commit 561ff1fa71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -31,9 +31,9 @@ from __future__ import annotations
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
@ -84,7 +84,7 @@ __all__ = [
@dataclass
class ReadlineConfig:
readline_completer: Completer | None = readline.get_completer()
readline_completer: Completer | None = RLCompleter().complete
completer_delims: frozenset[str] = frozenset(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?")

View File

@ -7,7 +7,6 @@ from test.support.import_helper import import_module
# 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):

View File

@ -0,0 +1 @@
Remove dependency to :mod:`readline` from the new Python REPL.