Skip to content

Commit

Permalink
[3.13] gh-121245: Correct pyrepl import in site.py (GH-121255) (#121261)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7a807c3)

Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Miro Hrončok <[email protected]>
  • Loading branch information
3 people authored Jul 2, 2024
1 parent 78c7732 commit 78e96bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,7 @@ def register_readline():

def write_history():
try:
# _pyrepl.__main__ is executed as the __main__ module
from __main__ import CAN_USE_PYREPL
from _pyrepl.main import CAN_USE_PYREPL
except ImportError:
CAN_USE_PYREPL = False

Expand Down
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 78e96bd

Please sign in to comment.