51. Audit Hooks
sys.addaudithook, the cpython.PyAudit_AddHook C API, and auditable events across the standard library.
12 notes
sys.addaudithook, the cpython.PyAudit_AddHook C API, and auditable events across the standard library.
PEP 567 Context and ContextVar objects, context copying on task creation, and asyncio integration.
Signal handler registration, the eval breaker flag, and safe SIGINT delivery to Python code.
Per-interpreter state isolation, Py_NewInterpreterFromConfig, and the experimental per-interpreter GIL.
Python thread objects, OS thread mapping, the GIL acquisition protocol, and thread-local state management.
GIL purpose, implementation in Python/ceval_gil.c, forced release intervals, and its effect on multi-core performance.
C3 linearization algorithm, mro() computation, and how Python resolves method lookup across multiple inheritance.
type.__new__ and type.__init__, __init_subclass__, __set_name__, and metaclass resolution order.
__get__, __set__, __delete__ protocol, data vs. non-data descriptors, and property/classmethod/staticmethod internals.
The per-module import lock, re-entrant import detection, and deadlock scenarios in multithreaded code.
Package __init__.py, namespace packages (PEP 420), relative imports, and __path__ manipulation.
The import machinery: finders, loaders, sys.modules cache, and the importlib bootstrap sequence.