cpython icon indicating copy to clipboard operation
cpython copied to clipboard

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

Open chgnrdv opened this issue 1 year ago • 1 comments

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

chgnrdv avatar May 10 '24 14:05 chgnrdv

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

encukou avatar Jun 12 '24 07:06 encukou

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

pablogsal avatar Jun 12 '24 11:06 pablogsal

The timeout should be fixed now.

lysnikolaou avatar Jun 12 '24 19:06 lysnikolaou

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

ambv avatar Jun 26 '24 14:06 ambv