GH-107774: Add missing audit event for PEP 669 (GH-107775)

This commit is contained in:
Mark Shannon 2023-08-10 12:29:06 +01:00 committed by GitHub
parent 39ef93edb9
commit 494e3d4436
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 0 deletions

View file

@ -1851,6 +1851,9 @@ monitoring_register_callback_impl(PyObject *module, int tool_id, int event,
PyErr_Format(PyExc_ValueError, "invalid event %d", event);
return NULL;
}
if (PySys_Audit("sys.monitoring.register_callback", "O", func) < 0) {
return NULL;
}
if (func == Py_None) {
func = NULL;
}