mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[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:
parent
78c77327a9
commit
78e96bdf24
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue