From b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 23 May 2019 08:45:22 -0700 Subject: bpo-36842: Implement PEP 578 (GH-12613) Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs. --- Python/Python-ast.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Python/Python-ast.c') diff --git a/Python/Python-ast.c b/Python/Python-ast.c index e84a7586a7..39a40eedca 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -9024,6 +9024,10 @@ mod_ty PyAST_obj2mod_ex(PyObject* ast, PyArena* arena, int mode, int feature_ver char *req_name[] = {"Module", "Expression", "Interactive"}; int isinstance; + if (PySys_Audit("compile", "OO", ast, Py_None) < 0) { + return NULL; + } + req_type[0] = (PyObject*)Module_type; req_type[1] = (PyObject*)Expression_type; req_type[2] = (PyObject*)Interactive_type; -- cgit v1.2.1