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 steve.dower
Recipients Dutcho, christian.heimes, steve.dower
Date 2020-01-03.18:48:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578077329.62.0.139589619435.issue39182@roundup.psfhosted.org>
In-reply-to
Content
I think this is specific to the interactive prompt. Under normal circumstances, any error in calling the hook at the point where an event is being audited (which is immediate when using interactive mode) needs to propagate.

Probably the best way to handle it is to call the hook with a new event indicating it's being added, but before it actually gets put into the list. A hook could then set up a different kind of loop, but it would be much harder to do it by accident.

Perhaps "sys.addaudithook/self" with itself as an argument. We can't just use "sys.addaudithook" in case there are hooks that blindly abort this event (which there are, because I've written them ;) ). But this will at least make sure that the signature is correct and shouldn't send the interactive parser into a loop.
History
Date User Action Args
2020-01-03 18:48:49steve.dowersetrecipients: + steve.dower, christian.heimes, Dutcho
2020-01-03 18:48:49steve.dowersetmessageid: <1578077329.62.0.139589619435.issue39182@roundup.psfhosted.org>
2020-01-03 18:48:49steve.dowerlinkissue39182 messages
2020-01-03 18:48:49steve.dowercreate