[3.13] gh-136697: Use the standard audit event format for sys.monitor… (#136750)
Some checks failed
Lint / lint (push) Has been cancelled
Tests / Change detection (push) Has been cancelled
Tests / Docs (push) Has been cancelled
Tests / Check if the ABI has changed (push) Has been cancelled
Tests / Check if Autoconf files are up to date (push) Has been cancelled
Tests / Check if generated files are up to date (push) Has been cancelled
Tests / (push) Has been cancelled
Tests / Windows MSI (push) Has been cancelled
Tests / Ubuntu SSL tests with OpenSSL (push) Has been cancelled
Tests / WASI (push) Has been cancelled
Tests / Hypothesis tests on Ubuntu (push) Has been cancelled
Tests / Address sanitizer (push) Has been cancelled
Tests / CIFuzz (push) Has been cancelled
Tests / All required checks pass (push) Has been cancelled

* [3.13] gh-136697: Use the standard audit event format for sys.monitoring docs (GH-136747)
(cherry picked from commit 28937d3a21)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
This commit is contained in:
Tian Gao 2025-07-17 11:43:20 -07:00 committed by GitHub
parent 46fe8e38c4
commit a45d3fd8be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -314,14 +314,13 @@ To register a callable for events call
it is unregistered and returned.
Otherwise :func:`register_callback` returns ``None``.
.. audit-event:: sys.monitoring.register_callback func sys.monitoring.register_callback
Functions can be unregistered by calling
``sys.monitoring.register_callback(tool_id, event, None)``.
Callback functions can be registered and unregistered at any time.
Registering or unregistering a callback function will generate a :func:`sys.audit` event.
Callback function arguments
'''''''''''''''''''''''''''