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 Dutcho
Recipients Dutcho
Date 2020-01-01.17:23:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577899380.86.0.650724982572.issue39182@roundup.psfhosted.org>
In-reply-to
Content
When hook is not a compatible callable, addaudithook() will loop forever. At the minimum, a check for being callable should be executed. Preferably, a non-compatible (i.e. signature != [[str, tuple], Any]) hook callable should also be detected.

>py
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.addaudithook(0)
error=10
Exception ignored in audit hook:
TypeError: 'int' object is not callable
  File "<stdin>", line 0
SyntaxError: unknown parsing error
error=10
Exception ignored in audit hook:
TypeError: 'int' object is not callable
  File "<stdin>", line 0
SyntaxError: unknown parsing error
error=10
Exception ignored in audit hook:
TypeError: 'int' object is not callable
  File "<stdin>", line 0
SyntaxError: unknown parsing error
... etc. ...
History
Date User Action Args
2020-01-01 17:23:00Dutchosetrecipients: + Dutcho
2020-01-01 17:23:00Dutchosetmessageid: <1577899380.86.0.650724982572.issue39182@roundup.psfhosted.org>
2020-01-01 17:23:00Dutcholinkissue39182 messages
2020-01-01 17:23:00Dutchocreate