[Python-Dev] PEP 578: Python Runtime Audit Hooks
I don't like adding more Python callback from low level.
Python runtime is very complicated already, especially __del__,
shutdown process, and multi threading. Python callback from low level
is source of very difficult bugs always.
Additionally, if we used the PEP for logging complex application,
the log will be unreliable. For example:
1. Want to open file A in C code, call callback.
2. In the callback, "A is opened" is logged.
3. In the same callback, import may be happened and logged.
4. In the same callback, other thread may be run and any thing can be logged.
5. Many many other things happens and callback is called.
6. Then, open the file A.
In this example, logged event ordering and timing is very different from
real event ordering and timing.
I prefer low level tool to trace low level thing, although it lacks some
application context. Maybe, DTrace will become more important tool.
Inada Naoki <songofacandy at gmail.com>