Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-111201: Remove readline dependency from the PyREPL (GH-119262) #119403

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?")


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.
Loading