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. https://techcommunity.microsoft.com/t5/Windows-Kernel-Internals/DTrace-on-Windows/ba-p/362902 Regards, -- Inada Naoki <songofaca...@gmail.com> _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com