-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
gh-119512: Use new REPL for the code module #148261
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
Open
tanloong
wants to merge
8
commits into
python:main
Choose a base branch
from
tanloong:code-pyrepl
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d0ca4a8
Use new REPL for the code module
tanloong 83086b2
blurb
tanloong 355ae0a
fix typo in news entry
tanloong 970032b
Disable PyREPL by default to avoid breaking third party applications
tanloong a90ad04
Add documentation
tanloong 5e45ca6
Revert use_pyrepl=False in sqlite3 as use_pyrepl is False by default
tanloong d77fa60
Add whatsnew
tanloong c9dbd8c
Doc: fix py:meth reference target not found
tanloong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -722,6 +722,18 @@ calendar | |
| (Contributed by Pål Grønås Drange in :gh:`140212`.) | ||
|
|
||
|
|
||
| code | ||
| ---- | ||
|
|
||
| * The :meth:`code.InteractiveConsole.interact` method and the :func:`code.interact` | ||
| function now support a *use_pyrepl* parameter to control whether to use the | ||
| pyrepl-based REPL. By default, *use_pyrepl* is ``False``, using the basic | ||
| readline-based REPL. When set to ``True``, pyrepl is used if available. | ||
| When set to ``None``, pyrepl is used automatically if available and the | ||
| :envvar:`PYTHON_BASIC_REPL` environment variable is not set. | ||
| (Contributed by Long Tan in :gh:`148261`.) | ||
|
|
||
|
|
||
| collections | ||
| ----------- | ||
|
|
||
|
|
@@ -830,9 +842,9 @@ http.server | |
| is colored by default. | ||
| This can be controlled with :ref:`environment variables | ||
| <using-on-controlling-color>`. | ||
| (Contributed by Hugo van Kemenade in :gh:`146292`.) | ||
| (Contributed by Hugo van Kemenade in :gh:`146292`.) | ||
|
|
||
|
|
||
|
Comment on lines
+845
to
+847
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is unrelated change, please revert. |
||
| inspect | ||
| ------- | ||
|
|
||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make
Nonebehavior - default, and get rid of theuse_pyreploption? 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.