diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index fb886a714d7471..de58f266bf5e6e 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 834646f7f776f8..4fad45b2de9c73 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,11 @@ Released on 2019-06-24? ====================================== +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 91803fd06c8f1e..cee6887df68f9d 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -14,7 +14,7 @@ - + @@ -135,113 +135,75 @@
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.
@@ -885,7 +823,7 @@tkinter.scrolledtext
— Scrolled Text Widget
tkinter.scrolledtext
— Scrolled Text Widget
Other Graphical User Interface Packages
@@ -957,11 +895,11 @@