Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.14] gh-127960 Fix the REPL to set the correct namespace by setting the correct__main__ module (gh-134275)#134473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 1 commit intopython:3.14frommiss-islington:backport-b1b8962-3.14
May 22, 2025

Conversation

miss-islington
Copy link
Contributor

@miss-islingtonmiss-islington commentedMay 22, 2025
edited by bedevere-appbot
Loading

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 asfrom . import * works based on the_pyrepl module.
(cherry picked from commitb1b8962)

Co-authored-by: Yuichiro Tachibana (Tsuchiya)t.yic.yt@gmail.com
Co-authored-by: Łukasz Langalukasz@langa.pl

…the correct `__main__` module (pythongh-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.(cherry picked from commitb1b8962)Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal is a code owner

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou is a code owner

@ambvambvAwaiting requested review from ambvambv is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@miss-islington@ambv@whitphx

[8]ページ先頭

©2009-2025 Movatter.jp