[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset f54f062f68ac82fc3e7c92345b4d5fbe2534dc84 by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.7':
bpo-26806: IDLE should run without docstrings (GH-14657) (GH-14678)
https://github.com/python/cpython/commit/f54f062f68ac82fc3e7c92345b4d5fbe2534dc84


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset b82188d9bad1774624cb1788dbdec2f0d7d65688 by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.8':
bpo-26806: IDLE should run without docstrings (GH-14657) (GH-14677)
https://github.com/python/cpython/commit/b82188d9bad1774624cb1788dbdec2f0d7d65688


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14483
pull_request: https://github.com/python/cpython/pull/14677

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 6aeb2fe606408aae14c246470794f1303b3be812 by Terry Jan Reedy in 
branch 'master':
bpo-26806: IDLE should run without docstrings (#14657)
https://github.com/python/cpython/commit/6aeb2fe606408aae14c246470794f1303b3be812


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14484
pull_request: https://github.com/python/cpython/pull/14678

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-08 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +14464
pull_request: https://github.com/python/cpython/pull/14657

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-06 Thread Tal Einat


Change by Tal Einat :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-06 Thread miss-islington


miss-islington  added the comment:


New changeset d666217b26c373784761e3a84f243f02682bccb1 by Miss Islington (bot) 
in branch '3.7':
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
https://github.com/python/cpython/commit/d666217b26c373784761e3a84f243f02682bccb1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-06 Thread miss-islington


miss-islington  added the comment:


New changeset d4af55391f56286ab8d478591017174a5a0a5ce2 by Miss Islington (bot) 
in branch '3.8':
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
https://github.com/python/cpython/commit/d4af55391f56286ab8d478591017174a5a0a5ce2


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-06 Thread Tal Einat


Tal Einat  added the comment:


New changeset fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71 by Tal Einat in branch 
'master':
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
https://github.com/python/cpython/commit/fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14435
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14621

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-07-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14436
pull_request: https://github.com/python/cpython/pull/14622

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-06-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

[Initially written before you posted the PR]
Serhiy's result suggests that 25 might not always be enough and he suggested 
50.  Plus IDLE sometimes makes more calls internally.  Lets go with at least 30.

I agree that "get...(set...(n)) == n" (when n is positive, a check we should 
emulate) and "set...(get...())" leaving limit as it was are desirable.  The 
docs and docstrings just need to say what we do.  Possible additions.
"This IDLE wrapper adds 30 to prevent possible uninterruptible loops."
"This IDLE wrapper subtracts 30 to compensate for the 30 IDLE adds when setting 
the limit."

The main reason I can think of for users to play with low recursion limits is 
to explore the implementation.  They simply cannot get stock CPython behavior 
when running with IDLE.  So I want the IDLE wrappers to not be completely 
transparent. For that to be obvious in calltips, the first line should say so.

The main reason I want to intervene is to prevent the not-nice behavior of 
hanging until a manual restart.  I checked, and it is still possible.

In 3.8.0b1, the min n is not 1 but current stack + 5.
>>> sys.setrecursionlimit(11)
Traceback (most recent call last):
  File "", line 1, in 
sys.setrecursionlimit(11)
RecursionError: cannot set the recursion limit to 11 at the recursion depth 6: 
the limit is too low

Our increment will prevent a user from seeing this, but this is necessary to 
prevent ...

>>> sys.setrecursionlimit(12)
# hangs, once after printing "Exception ignored in thread started by"
# until manual restart.
# 18 hangs after printing 60 lines of a double exception.
# 20 does not hang and calling 'f' from the original message
# gets a truncated traceback ending with
   [Previous line repeated 12 more times]

--
stage: patch review -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-06-10 Thread Tal Einat


Tal Einat  added the comment:

See PR GH-13944.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-06-10 Thread Tal Einat


Change by Tal Einat :


--
keywords: +patch
pull_requests: +13811
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13944

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-06-10 Thread Tal Einat


Tal Einat  added the comment:

Setting the recursion limit too low also causes issues in a plain Python 
interactive session. With current master (to be 3.9) on Win10, I get issues 
with values up to 6. In IDLE values up to 20 cause an immediate exception 
similar to the one described by Serhiy.

Anyways, I think we should increment by 25, to always set "safe" values.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-06-10 Thread Tal Einat


Tal Einat  added the comment:

> 'max(n, 50)' should have been 'min(n, 50)'  Tal, does you comment avove about 
> the former apply when corrected to the latter?

Yes. To use your terms, I prefer incrementing over thresholding.

> This is all that is needed for getrecursionlimit.

If we go with incrementing, then getrecursionlimit should likely decrement the 
returned value by the same amount, so that 
setrecursionlimit(getrecursionlimit()) doesn't change the recursion limit.

> Currently, at least on CPython, n must be >= 1 or ValueError is raised.  I 
> don't like changing that.

This is another issue that incrementing avoids.

Since it looks like we're in general agreement, Terry, I'll work up a PR.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-06-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

'max(n, 50)' should have been 'min(n, 50)'  Tal, does you comment avove about 
the former apply when corrected to the latter?

Both get... and setrecursionlimit should be wrapped in a function, such as 
'wrap_recursionlimits', called from run.main, each decorated with 
functools.wraps.  Both docstrings should be augmented with ... .__doc__ += 
"\n\nWhen running under IDLE, ..."  This is all that is needed for 
getrecursionlimit.  The question is to do with setrecursionlimit.

Whatever is chosen should be added to the IDLE doc section mentioned above.

Currently, at least on CPython, n must be >= 1 or ValueError is raised.  I 
don't like changing that.  I don't have a strong feeling about threshholding 
versus incrementing, but see my question above.

--
versions:  -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-06-09 Thread Tal Einat


Tal Einat  added the comment:

IMO just updating the documentation would not be enough.

I suggest wrapping sys.setrecursionlimit() and *adding* 30 to the given limit, 
to offset the call stack depth added by IDLE. This makes more sense to me than 
max(n, 50), which I imagine would cause a lot of confusion in cases where it 
comes into effect.

If that's not acceptable, then I suggest wrapping it to raise an informative 
exception if the given limit is too low.

--
nosy: +taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2019-06-09 Thread Tal Einat


Change by Tal Einat :


--
components:  -Documentation
versions: +Python 3.8, Python 3.9 -Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2016-10-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I ran into this again.  Raising priority.

--
priority: normal -> high
title: IDLE not displaying RecursionError tracebacks -> IDLE not displaying 
RecursionError tracebacks and hangs
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com