summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-08-11 09:58:58 (GMT)
committerGitHub <noreply@github.com>2023-08-11 09:58:58 (GMT)
commit81d3afae1ae89a302866fb0cd12dc9f722e8aa4c (patch)
tree76236b14821006e1ec9d227161d16c40139f4846 /Python
parentddca26188d7828ecb762213f4b9c15d44b6048cc (diff)
downloadcpython-81d3afae1ae89a302866fb0cd12dc9f722e8aa4c.zip
cpython-81d3afae1ae89a302866fb0cd12dc9f722e8aa4c.tar.gz
cpython-81d3afae1ae89a302866fb0cd12dc9f722e8aa4c.tar.bz2
[3.12] GH-107774: Add missing audit event for PEP 669 (GH-107775) (#107839)
GH-107774: Add missing audit event for PEP 669 (GH-107775) (cherry picked from commit 494e3d4436774a5ac1a569a635b8c5c881ef1c0c) Co-authored-by: Mark Shannon <mark@hotpy.org>
Diffstat (limited to 'Python')
-rw-r--r--Python/instrumentation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/instrumentation.c b/Python/instrumentation.c
index 8714324..a5b10ae 100644
--- a/Python/instrumentation.c
+++ b/Python/instrumentation.c
@@ -1858,6 +1858,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;
}