Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge main.
  • Loading branch information
devdanzin committed Oct 9, 2024
commit 6c68ca4d9ce5a8bb6489d456af464bf8a1bf00c2
11 changes: 8 additions & 3 deletions Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,12 @@ def register_readline():
console_error = [_pyrepl.windows_console._error]
real_readline = False
import rlcompleter # noqa: F401
import _pyrepl.readline
if PYTHON_BASIC_REPL:
CAN_USE_PYREPL = False
else:
import _pyrepl.readline
import _pyrepl.unix_console
from _pyrepl.main import CAN_USE_PYREPL
except ImportError:
return

Expand Down Expand Up @@ -541,14 +546,14 @@ def register_readline():

if CAN_USE_PYREPL:
readline_module = _pyrepl.readline
exceptions = (OSError, *_pyrepl.unix_console._error)
exceptions = (OSError, *console_error)
else:
readline_module = readline
exceptions = OSError

try:
readline_module.read_history_file(history)
except (OSError, * console_error):
except exceptions:
pass

def write_history():
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.