Skip to content

Commit 7a807c3

Browse files
skirpichevhroncok
andauthored
gh-121245: Amend d611c4c (correct import) (#121255)
Co-authored-by: Miro Hrončok <[email protected]>
1 parent 7435f05 commit 7a807c3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Lib/site.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,7 @@ def register_readline():
526526

527527
def write_history():
528528
try:
529-
# _pyrepl.__main__ is executed as the __main__ module
530-
from __main__ import CAN_USE_PYREPL
529+
from _pyrepl.main import CAN_USE_PYREPL
531530
except ImportError:
532531
CAN_USE_PYREPL = False
533532

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix a bug in the handling of the command history of the new :term:`REPL` that caused
2+
the history file to be wiped at REPL exit.

0 commit comments

Comments
 (0)