This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients iritkatriel, ppperry, scotchka, serhiy.storchaka, xtreak
Date 2021-08-03.14:46:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628002016.86.0.302153614282.issue34782@roundup.psfhosted.org>
In-reply-to
Content
You cannot expect that running code under debugger does not have any effect. Otherwise there would not be any meaning in debugger. Running code under debugger has some side effects, and setting locals __return__ and __exception__ is one of them. If it exposes bugs in user code -- well, it is a purpose of debugger.

I think that there are two options for this issue.

1. Add a type check for locals in the frame constructor (and maybe at higher levels).

2. Close it as "not a bug". Using functions outside of documented scope has undefined behavior. Python usually does not check types of arguments. If it works -- it works, if not -- blame on you.
History
Date User Action Args
2021-08-03 14:46:56serhiy.storchakasetrecipients: + serhiy.storchaka, ppperry, xtreak, scotchka, iritkatriel
2021-08-03 14:46:56serhiy.storchakasetmessageid: <1628002016.86.0.302153614282.issue34782@roundup.psfhosted.org>
2021-08-03 14:46:56serhiy.storchakalinkissue34782 messages
2021-08-03 14:46:56serhiy.storchakacreate