diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index fb886a714d7..de58f266bf5 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -713,6 +713,10 @@ or ``print`` or ``write`` to sys.stdout or sys.stderr, IDLE should be started in a command line window. The secondary subprocess will then be attached to that window for input and output. +The IDLE code running in the execution process adds frames to the call stack +that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and +``sys.setrecursionlimit`` to reduce the effect of the additional stack frames. + If ``sys`` is reset by user code, such as with ``importlib.reload(sys)``, IDLE's changes are lost and input from the keyboard and output to the screen will not work correctly. diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 689539e73c1..5d4a936d63f 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,11 @@ Released on 2019-10-20? ====================================== +bpo-26806: To compensate for stack frames added by IDLE and avoid +possible problems with low recursion limits, add 30 to limits in the +user code execution process. Subtract 30 when reporting recursion +limits to make this addition mostly transparent. + bpo-37325: Fix tab focus traversal order for help source and custom run dialogs. diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index 91803fd06c8..cee6887df68 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -14,7 +14,7 @@ - + @@ -135,113 +135,75 @@ described below are moved around to conform to Apple guidelines.
The clipboard functions are also available in context menus.
print
or write
.
When execution is complete, the Shell retains focus and displays a prompt.
@@ -271,8 +230,7 @@ This is similar to executing a file with
-- Run… Customized
-- Same as Run Module, but run the module with customized
+
- Run… Customized
- Same as Run Module, but run the module with customized
settings. Command Line Arguments extend
sys.argv
as if passed
on a command line. The module can be run in the Shell without restarting.
Additional help sources may be added here with the Configure IDLE dialog under the General tab. See the Help sources subsection below @@ -365,32 +307,25 @@ for more on Help menu choices.
Open a context menu by right-clicking in a window (Control-click on macOS). Context menus have the standard clipboard functions also on the Edit menu.
Editor windows also have breakpoint functions. Lines with a breakpoint set are specially marked. Breakpoints only have an effect when running under the debugger. Breakpoints for a file are saved in the user’s .idlerc directory.
Shell and Output windows also have the following.
The Shell window also has an output squeezing facility explained in the Python Shell window subsection below.
print
or write
to sys.stdout or sys.stderr,
IDLE should be started in a command line window. The secondary subprocess
will then be attached to that window for input and output.
+The IDLE code running in the execution process adds frames to the call stack
+that would not be there otherwise. IDLE wraps sys.getrecursionlimit
and
+sys.setrecursionlimit
to reduce their visibility.
If sys
is reset by user code, such as with importlib.reload(sys)
,
IDLE’s changes are lost and input from the keyboard and output to the screen
will not work correctly.
Deprecated since version 3.4.
+Deprecated since version 3.4.
tkinter.scrolledtext
— Scrolled Text Widget
tkinter.scrolledtext
— Scrolled Text Widget
Other Graphical User Interface Packages
@@ -957,11 +895,11 @@ also used for testing.