mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
[3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822)
(cherry picked from commit e5c7216f37
)
Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
0794220a69
commit
5b718e7fc7
6 changed files with 85 additions and 42 deletions
|
@ -517,10 +517,7 @@ def register_readline():
|
|||
pass
|
||||
|
||||
if readline.get_current_history_length() == 0:
|
||||
try:
|
||||
from _pyrepl.main import CAN_USE_PYREPL
|
||||
except ImportError:
|
||||
CAN_USE_PYREPL = False
|
||||
from _pyrepl.main import CAN_USE_PYREPL
|
||||
# If no history was loaded, default to .python_history,
|
||||
# or PYTHON_HISTORY.
|
||||
# The guard is necessary to avoid doubling history size at
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue