-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestopic-replRelated to the interactive shellRelated to the interactive shelltriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The code in pymain_repl() in "Modules/main.c" needs to check _Py_GetEnv(config->use_environment, "PYTHON_BASIC_REPL"). Otherwise running with -i, or with PYTHONINSPECT set in the environment, ends up running the new REPL instead of the basic REPL after the command or script finishes.
Lines 545 to 550 in 02c1dff
| if (!isatty(fileno(stdin))) { | |
| PyCompilerFlags cf = _PyCompilerFlags_INIT; | |
| int run = PyRun_AnyFileExFlags(stdin, "<stdin>", 0, &cf); | |
| *exitcode = (run != 0); | |
| return; | |
| } |
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestopic-replRelated to the interactive shellRelated to the interactive shelltriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error