gh-121245: Amend d611c4c8e9 (correct import) (#121255)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
This commit is contained in:
Sergey B Kirpichev 2024-07-02 12:40:01 +03:00 committed by GitHub
parent 7435f053b4
commit 7a807c3efa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -526,8 +526,7 @@ def register_readline():
def write_history(): def write_history():
try: try:
# _pyrepl.__main__ is executed as the __main__ module from _pyrepl.main import CAN_USE_PYREPL
from __main__ import CAN_USE_PYREPL
except ImportError: except ImportError:
CAN_USE_PYREPL = False CAN_USE_PYREPL = False

View File

@ -0,0 +1,2 @@
Fix a bug in the handling of the command history of the new :term:`REPL` that caused
the history file to be wiped at REPL exit.