summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-07-15 22:49:41 (GMT)
committerGitHub <noreply@github.com>2024-07-15 22:49:41 (GMT)
commit5b718e7fc723d484951aa76abd176aadcd0d1518 (patch)
treedd3306e9fc52d3701f96cf185da2a7f0451267a9 /Lib/site.py
parent0794220a6935a25bd9667be60b0c67403bc73f47 (diff)
downloadcpython-5b718e7fc723d484951aa76abd176aadcd0d1518.zip
cpython-5b718e7fc723d484951aa76abd176aadcd0d1518.tar.gz
cpython-5b718e7fc723d484951aa76abd176aadcd0d1518.tar.bz2
[3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822)
(cherry picked from commit e5c7216f376a06d2c931daf999e2980e494e747e) Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com> Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/site.py b/Lib/site.py
index 8e7a20d..0a0dc47 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -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