diff options
author | Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com> | 2025-05-21 19:18:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-22 02:18:00 +0200 |
commit | b1b8962443e7d418601658a4b05347a5a9161910 (patch) | |
tree | 9ecb32485011e518b2cb55fa7c944451231591b9 /Lib/test/test_pathlib/test_pathlib.py | |
parent | a66bae8bb52721ea597ade6222f83876f9e939ba (diff) | |
download | cpython-b1b8962443e7d418601658a4b05347a5a9161910.tar.gz cpython-b1b8962443e7d418601658a4b05347a5a9161910.zip |
gh-127960 Fix the REPL to set the correct namespace by setting the correct `__main__` module (gh-134275)
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.
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/test/test_pathlib/test_pathlib.py')
0 files changed, 0 insertions, 0 deletions