gh-119512: Use new REPL for the code module#148261
Open
tanloong wants to merge 8 commits intopython:mainfrom
Open
gh-119512: Use new REPL for the code module#148261tanloong wants to merge 8 commits intopython:mainfrom
tanloong wants to merge 8 commits intopython:mainfrom
Conversation
skirpichev
reviewed
Apr 9, 2026
Comment on lines
+174
to
+176
| the basic readline-based REPL is used. When ``None``, pyrepl is used | ||
| automatically if available and the :envvar:`PYTHON_BASIC_REPL` environment | ||
| variable is not set. |
Member
There was a problem hiding this comment.
Why not make None behavior - default, and get rid of the use_pyrepl option? Users can override this by setting PYTHON_BASIC_REPL.
I presume, new option was chosen on ground backward-compatibility, but new REPL is an incompatible change by itself, this is just a continuation.
So, I think it's fine to remove added option, but please wait first feedback from core developers.
Comment on lines
+845
to
+847
| (Contributed by Hugo van Kemenade in :gh:`146292`.) | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
This is unrelated change, please revert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an optional
use_pyrepl: bool|None=Falseparameter tocode.InteractiveConsole.interact()andcode.interact().When set as
True, pyrepl is used. WhenFalse(the default), the basic readline-based REPL is used. WhenNone, pyrepl is used if available and thePYTHON_BASIC_REPLenvironment variable is not set.