[3.13] gh-121245: Correct pyrepl import in site.py (GH-121255) (#121261)

(cherry picked from commit 7a807c3efa)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
This commit is contained in:
Miss Islington (bot) 2024-07-02 13:40:05 +02:00 committed by GitHub
parent 78c77327a9
commit 78e96bdf24
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():
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