@@ -275,6 +275,12 @@ are always available. They are listed here in alphabetical order.
275275 If you want to parse Python code into its AST representation, see
276276 :func: `ast.parse `.
277277
278+ .. audit-event :: compile "source filename"
279+
280+ Raises an :func: `auditing event <sys.audit> ` ``compile `` with arguments
281+ ``source `` and ``filename ``. This event may also be raised by implicit
282+ compilation.
283+
278284 .. note ::
279285
280286 When compiling a string with multi-line code in ``'single' `` or
@@ -473,6 +479,11 @@ are always available. They are listed here in alphabetical order.
473479 See :func: `ast.literal_eval ` for a function that can safely evaluate strings
474480 with expressions containing only literals.
475481
482+ .. audit-event :: exec code_object
483+
484+ Raises an :func: `auditing event <sys.audit> ` ``exec `` with the code object as
485+ the argument. Code compilation events may also be raised.
486+
476487.. index :: builtin: exec
477488
478489.. function :: exec(object[, globals[, locals]])
@@ -502,6 +513,11 @@ are always available. They are listed here in alphabetical order.
502513 builtins are available to the executed code by inserting your own
503514 ``__builtins__ `` dictionary into *globals * before passing it to :func: `exec `.
504515
516+ .. audit-event :: exec code_object
517+
518+ Raises an :func: `auditing event <sys.audit> ` ``exec `` with the code object as
519+ the argument. Code compilation events may also be raised.
520+
505521 .. note ::
506522
507523 The built-in functions :func: `globals ` and :func: `locals ` return the current
@@ -747,6 +763,16 @@ are always available. They are listed here in alphabetical order.
747763 If the :mod: `readline ` module was loaded, then :func: `input ` will use it
748764 to provide elaborate line editing and history features.
749765
766+ .. audit-event :: builtins.input prompt
767+
768+ Raises an :func: `auditing event <sys.audit> ` ``builtins.input `` with
769+ argument ``prompt `` before reading input
770+
771+ .. audit-event :: builtins.input/result result
772+
773+ Raises an auditing event ``builtins.input/result `` with the result after
774+ successfully reading input.
775+
750776
751777.. class :: int([x])
752778 int(x, base=10)
@@ -1176,6 +1202,11 @@ are always available. They are listed here in alphabetical order.
11761202 (where :func: `open ` is declared), :mod: `os `, :mod: `os.path `, :mod: `tempfile `,
11771203 and :mod: `shutil `.
11781204
1205+ .. audit-event :: open "file mode flags"
1206+
1207+ The ``mode `` and ``flags `` arguments may have been modified or inferred from
1208+ the original call.
1209+
11791210 .. versionchanged ::
11801211 3.3
11811212
0 commit comments