Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New REPL exposes its internal imports/definitions to top-level environment #118908

Open
chgnrdv opened this issue May 10, 2024 · 4 comments
Open
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@chgnrdv
Copy link
Contributor

chgnrdv commented May 10, 2024

Bug report

Bug description:

Top-level scope now contains globals of _pyrepl.__main__:

Python 3.14.0a0 (heads/main:a895756aec, May 10 2024, 16:56:55) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> dir()
['CAN_USE_PYREPL', '__annotations__', '__builtins__', '__cached__', '__doc__', '__file__',
'__loader__', '__name__', '__package__', '__spec__', 'interactive_console', 'os', 'sys']

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

@chgnrdv chgnrdv added the type-bug An unexpected behavior, bug, or error label May 10, 2024
@hugovk hugovk added topic-repl Related to the interactive shell 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels May 10, 2024
eugenetriguba added a commit to eugenetriguba/cpython that referenced this issue May 25, 2024
pablogsal added a commit to eugenetriguba/cpython that referenced this issue Jun 11, 2024
pablogsal added a commit to eugenetriguba/cpython that referenced this issue Jun 11, 2024
pablogsal pushed a commit that referenced this issue Jun 11, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 11, 2024
…nitions on new REPL startup (pythonGH-119547)

(cherry picked from commit 86a8a1c)

Co-authored-by: Eugene Triguba <[email protected]>
pablogsal pushed a commit that referenced this issue Jun 11, 2024
lysnikolaou added a commit to lysnikolaou/cpython that referenced this issue Jun 11, 2024
@encukou
Copy link
Member

encukou commented Jun 12, 2024

It seems that this change broke a buildbot, see: https://buildbot.python.org/all/#/builders/249/builds/8895/steps/5/logs/stdio

@encukou encukou reopened this Jun 12, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 12, 2024
lysnikolaou added a commit that referenced this issue Jun 12, 2024
@pablogsal
Copy link
Member

It seems that this change broke a buildbot, see: https://buildbot.python.org/all/#/builders/249/builds/8895/steps/5/logs/stdio

It looks like a timeout.... I will try to investigate today

@lysnikolaou
Copy link
Contributor

The timeout should be fixed now.

@ambv ambv reopened this Jun 26, 2024
@ambv
Copy link
Contributor

ambv commented Jun 26, 2024

The fix is invalid. It makes it impossible to auto-import stuff with PYTHONSTARTUP.

ambv added a commit to ambv/cpython that referenced this issue Jun 26, 2024
This allows for PYTHONSTARTUP to execute in the right namespace.
ambv added a commit to ambv/cpython that referenced this issue Jun 26, 2024
This allows for PYTHONSTARTUP to execute in the right namespace.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 26, 2024
mrahtz pushed a commit to mrahtz/cpython that referenced this issue Jun 30, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

6 participants