summaryrefslogtreecommitdiff
path: root/Python/importdl.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2019-05-23 08:45:22 -0700
committerGitHub <noreply@github.com>2019-05-23 08:45:22 -0700
commitb82e17e626f7b1cd98aada0b1ebb65cb9f8fb184 (patch)
tree5370a2a075707cb0b37ce135cad6ffe23da424c4 /Python/importdl.c
parente788057a9188ff37e232729815dfda2529079420 (diff)
downloadcpython-git-b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184.tar.gz
bpo-36842: Implement PEP 578 (GH-12613)
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
Diffstat (limited to 'Python/importdl.c')
-rw-r--r--Python/importdl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/importdl.c b/Python/importdl.c
index 50231ff288..1d0d32a237 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -119,6 +119,11 @@ _PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *fp)
if (path == NULL)
goto error;
+ if (PySys_Audit("import", "OOOOO", name_unicode, path,
+ Py_None, Py_None, Py_None) < 0) {
+ return NULL;
+ }
+
#ifdef MS_WINDOWS
exportfunc = _PyImport_FindSharedFuncptrWindows(hook_prefix, name_buf,
path, fp);