Skip to content

Commit

Permalink
pythongh-111201: Remove readline dependency from the PyREPL (python#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
lysnikolaou authored and estyxx committed Jul 17, 2024
1 parent a378ae7 commit a16e672
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Lib/_pyrepl/readline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -84,7 +84,7 @@

@dataclass
class ReadlineConfig:
readline_completer: Completer | None = readline.get_completer()
readline_completer: Completer | None = RLCompleter().complete
completer_delims: frozenset[str] = frozenset(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?")


Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_pyrepl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove dependency to :mod:`readline` from the new Python REPL.

0 comments on commit a16e672

Please sign in to comment.