bpo-36842: Implement PEP 578 (GH-12613)
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index 14fa27b..1895ae7 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -95,6 +95,12 @@
parameter to ``urllib.urlopen``, can be obtained by using
:class:`ProxyHandler` objects.
+ .. audit-event:: urllib.request "fullurl data headers method"
+
+ The default opener raises an :func:`auditing event <sys.audit>`
+ ``urllib.request`` with arguments ``fullurl``, ``data``, ``headers``,
+ ``method`` taken from the request object.
+
.. versionchanged:: 3.2
*cafile* and *capath* were added.
@@ -118,6 +124,7 @@
:func:`ssl.create_default_context` select the system's trusted CA
certificates for you.
+
.. function:: install_opener(opener)
Install an :class:`OpenerDirector` instance as the default global opener.