diff --git a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt index 15ae29d08..37c516cbc 100644 --- a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt @@ -8,7 +8,6 @@ fcntl.F_SETNOSIGPIPE posixpath.splitroot posix.waitid posix.waitid_result -readline.backend webbrowser.MacOSX # TODO: fix diff --git a/stdlib/@tests/stubtest_allowlists/linux-py313.txt b/stdlib/@tests/stubtest_allowlists/linux-py313.txt index 7418e8551..6a954388b 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py313.txt @@ -3,6 +3,5 @@ _stat.SF_SUPPORTED _stat.SF_SYNTHETIC mmap.MAP_NORESERVE posixpath.splitroot -readline.backend stat.SF_SUPPORTED stat.SF_SYNTHETIC diff --git a/stdlib/readline.pyi b/stdlib/readline.pyi index 688ae48d9..7325c267b 100644 --- a/stdlib/readline.pyi +++ b/stdlib/readline.pyi @@ -1,6 +1,7 @@ import sys from _typeshed import StrOrBytesPath from collections.abc import Callable, Sequence +from typing import Literal from typing_extensions import TypeAlias if sys.platform != "win32": @@ -34,3 +35,6 @@ if sys.platform != "win32": def set_completer_delims(string: str, /) -> None: ... def get_completer_delims() -> str: ... def set_completion_display_matches_hook(function: _CompDisp | None = None, /) -> None: ... + + if sys.version_info >= (3, 13): + backend: Literal["readline", "editline"]