Skip to content

Commit 2ee2fbb

Browse files
committed
pythongh-121245: Amend 38cfa92 (correct import)
This prevents writing incorrect history (empty).
1 parent c9302e8 commit 2ee2fbb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/site.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def register_readline():
527527
def write_history():
528528
try:
529529
# _pyrepl.__main__ is executed as the __main__ module
530-
from __main__ import CAN_USE_PYREPL
530+
from _pyrepl.main import CAN_USE_PYREPL
531531
except ImportError:
532532
CAN_USE_PYREPL = False
533533

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correct working with CLI history for new REPL.

0 commit comments

Comments
 (0)