[issue42950] Incorrect exception behavior in handling recursive call.

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe stdout.flush() or stdout.buffer.flush() raise a RecursionError? When run the interpreter with option -u the second error is gone. -- ___ Python tracker

[issue42950] Incorrect exception behavior in handling recursive call.

2021-01-18 Thread Mark Shannon
Mark Shannon added the comment: If you make calls in an exception handler that is handling a RecursionError, without unwinding first, then it is likely that another RecursionError may occur. What is strange is that the second RecursionError is raised after `print(str(e))` has printed the

[issue42950] Incorrect exception behavior in handling recursive call.

2021-01-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +Mark.Shannon, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42950] Incorrect exception behavior in handling recursive call.

2021-01-17 Thread Xinmeng Xia
New submission from Xinmeng Xia : Seeing the following programs, we try to catch a recursive call error in exception handling. The behaviors between Python 3.10.0a4 and older version are inconsistent. The outputs are attached in the end. The output on Python 3.10.0a4 is very weird. Two