diff options
author | Sergey B Kirpichev <skirpichev@gmail.com> | 2024-07-02 09:40:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-02 09:40:01 (GMT) |
commit | 7a807c3efaa83f1e4fb9b791579b47a0a1fd47de (patch) | |
tree | b7d40bb904b53de3207e1f7d324d80ec780226ed | |
parent | 7435f053b4a54372a2c43dee7a15c4b973f09209 (diff) | |
download | cpython-7a807c3efaa83f1e4fb9b791579b47a0a1fd47de.zip cpython-7a807c3efaa83f1e4fb9b791579b47a0a1fd47de.tar.gz cpython-7a807c3efaa83f1e4fb9b791579b47a0a1fd47de.tar.bz2 |
gh-121245: Amend d611c4c8e9 (correct import) (#121255)
Co-authored-by: Miro HronĨok <miro@hroncok.cz>
-rw-r--r-- | Lib/site.py | 3 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-07-02-11-34-06.gh-issue-121245.sSkDAr.rst | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py index 9381f6f..daa56e1 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -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 diff --git a/Misc/NEWS.d/next/Library/2024-07-02-11-34-06.gh-issue-121245.sSkDAr.rst b/Misc/NEWS.d/next/Library/2024-07-02-11-34-06.gh-issue-121245.sSkDAr.rst new file mode 100644 index 0000000..6e9dec2 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-07-02-11-34-06.gh-issue-121245.sSkDAr.rst @@ -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. |