Commit graph

5 commits

Author SHA1 Message Date
Miss Islington (bot)
998991513b
[3.14] gh-127960 Fix the REPL to set the correct namespace by setting the correct __main__ module (gh-134275) (gh-134473)
The `__main__` module imported in the `_pyrepl` module points to the `_pyrepl` module itself when the interpreter was launched without `-m` option and didn't execute a module,
while it's an unexpected behavior that `__main__` can be `_pyrepl` and relative imports such as `from . import *` works based on the `_pyrepl` module.
(cherry picked from commit b1b8962443)

Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-22 03:33:35 +02:00
Łukasz Langa
dc93d1125f
gh-121957: Emit audit events for python -i and python -m asyncio (GH-121958)
Relatedly, emit the `cpython.run_startup` event from the Python version of
`PYTHONSTARTUP` handling.
2024-07-22 13:04:08 +02:00
Milan Oberkirch
e5c7216f37
gh-121790: Fix interactive console initialization (#121793)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-16 00:24:18 +02:00
Sergey B Kirpichev
05d413764c
gh-121245: Refactor site.register_readline() (GH-121659)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-15 22:12:41 +02:00
Łukasz Langa
d611c4c8e9
gh-118908: Use __main__ for the default PyREPL namespace (#121054) 2024-06-26 15:01:10 -04:00