| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,7 +45,7 @@ bound into a function. | |||
| 45 | 45 | The first parameter (*argcount*) now represents the total number of positional arguments, | |
| 46 | 46 | including positional-only. | |
| 47 | 47 | ||
| 48 | - .. audit-event:: code.__new__ "code filename name argcount posonlyargcount kwonlyargcount nlocals stacksize flags" | ||
| 48 | + .. audit-event:: code.__new__ code,filename,name,argcount,posonlyargcount,kwonlyargcount,nlocals,stacksize,flags c.PyCode_New | ||
| 49 | 49 | ||
| 50 | 50 | .. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno) | |
| 51 | 51 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -291,8 +291,6 @@ accessible to C code. They all work with the current interpreter thread's | |||
| 291 | 291 | ||
| 292 | 292 | .. c:function:: int PySys_Audit(const char *event, const char *format, ...) | |
| 293 | 293 | ||
| 294 | - .. index:: single: audit events | ||
| 295 | - | ||
| 296 | 294 | Raises an auditing event with any active hooks. Returns zero for success | |
| 297 | 295 | and non-zero with an exception set on failure. | |
| 298 | 296 | ||
@@ -311,8 +309,6 @@ accessible to C code. They all work with the current interpreter thread's | |||
| 311 | 309 | ||
| 312 | 310 | .. c:function:: int PySys_AddAuditHook(Py_AuditHookFunction hook, void *userData) | |
| 313 | 311 | ||
| 314 | - .. index:: single: audit events | ||
| 315 | - | ||
| 316 | 312 | Adds to the collection of active auditing hooks. Returns zero for success | |
| 317 | 313 | and non-zero on failure. If the runtime has been initialized, also sets an | |
| 318 | 314 | error on failure. Hooks added through this API are called for all | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,7 +83,7 @@ The module defines the following type: | |||
| 83 | 83 | to add initial items to the array. Otherwise, the iterable initializer is | |
| 84 | 84 | passed to the :meth:`extend` method. | |
| 85 | 85 | ||
| 86 | - .. audit-event:: array.__new__ "typecode initializer" | ||
| 86 | + .. audit-event:: array.__new__ typecode,initializer array.array | ||
| 87 | 87 | ||
| 88 | 88 | .. data:: typecodes | |
| 89 | 89 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,21 @@ | |||
| 1 | + .. _audit-events: | ||
| 2 | + | ||
| 3 | + .. index:: single: audit events | ||
| 4 | + | ||
| 5 | + Audit events table | ||
| 6 | + ================== | ||
| 7 | + | ||
| 8 | + This table contains all events raised by :func:`sys.audit` or | ||
| 9 | + :c:func:`PySys_Audit` calls throughout the CPython runtime and the | ||
| 10 | + standard library. | ||
| 11 | + | ||
| 12 | + See :func:`sys.addaudithook` and :c:func:`PySys_AddAuditHook` for | ||
| 13 | + information on handling these events. | ||
| 14 | + | ||
| 15 | + .. impl-detail:: | ||
| 16 | + | ||
| 17 | + This table is generated from the CPython documentation, and may not | ||
| 18 | + represent events raised by other implementations. See your runtime | ||
| 19 | + specific documentation for actual events raised. | ||
| 20 | + | ||
| 21 | + .. audit-event-table:: | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1509,13 +1509,13 @@ object is available: | |||
| 1509 | 1509 | :c:type:`int`, which is of course not always the truth, so you have to assign | |
| 1510 | 1510 | the correct :attr:`restype` attribute to use these functions. | |
| 1511 | 1511 | ||
| 1512 | - .. audit-event:: ctypes.dlopen name | ||
| 1512 | + .. audit-event:: ctypes.dlopen name ctypes.LibraryLoader | ||
| 1513 | 1513 | ||
| 1514 | 1514 | Loading a library through any of these objects raises an | |
| 1515 | 1515 | :ref:`auditing event <auditing>` ``ctypes.dlopen`` with string argument | |
| 1516 | 1516 | ``name``, the name used to load the library. | |
| 1517 | 1517 | ||
| 1518 | - .. audit-event:: ctypes.dlsym "library name" | ||
| 1518 | + .. audit-event:: ctypes.dlsym library,name ctypes.LibraryLoader | ||
| 1519 | 1519 | ||
| 1520 | 1520 | Accessing a function on a loaded library raises an auditing event | |
| 1521 | 1521 | ``ctypes.dlsym`` with arguments ``library`` (the library object) and ``name`` | |
@@ -2043,7 +2043,7 @@ Data types | |||
| 2043 | 2043 | This method returns a ctypes type instance using the memory specified by | |
| 2044 | 2044 | *address* which must be an integer. | |
| 2045 | 2045 | ||
| 2046 | - .. audit-event:: ctypes.cdata address | ||
| 2046 | + .. audit-event:: ctypes.cdata address ctypes._CData.from_address | ||
| 2047 | 2047 | ||
| 2048 | 2048 | This method, and others that indirectly call this method, raises an | |
| 2049 | 2049 | :ref:`auditing event <auditing>` ``ctypes.cdata`` with argument | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,10 +5,13 @@ Debugging and Profiling | |||
| 5 | 5 | These libraries help you with Python development: the debugger enables you to | |
| 6 | 6 | step through code, analyze stack frames and set breakpoints etc., and the | |
| 7 | 7 | profilers run code and give you a detailed breakdown of execution times, | |
| 8 | - allowing you to identify bottlenecks in your programs. | ||
| 8 | + allowing you to identify bottlenecks in your programs. Auditing events | ||
| 9 | + provide visibility into runtime behaviors that would otherwise require | ||
| 10 | + intrusive debugging or patching. | ||
| 9 | 11 | ||
| 10 | 12 | .. toctree:: | |
| 11 | 13 | ||
| 14 | + audit_events.rst | ||
| 12 | 15 | bdb.rst | |
| 13 | 16 | faulthandler.rst | |
| 14 | 17 | pdb.rst | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -119,7 +119,7 @@ Module API | |||
| 119 | 119 | *verbosity* controls the level of output to :data:`sys.stdout` from the | |
| 120 | 120 | bootstrapping operation. | |
| 121 | 121 | ||
| 122 | - .. audit-event:: ensurepip.bootstrap root | ||
| 122 | + .. audit-event:: ensurepip.bootstrap root ensurepip.bootstrap | ||
| 123 | 123 | ||
| 124 | 124 | .. note:: | |
| 125 | 125 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -190,7 +190,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. | |||
| 190 | 190 | *source_address* is a 2-tuple ``(host, port)`` for the socket to bind to as | |
| 191 | 191 | its source address before connecting. | |
| 192 | 192 | ||
| 193 | - .. audit-event:: ftplib.FTP.connect "self host port" | ||
| 193 | + .. audit-event:: ftplib.connect self,host,port ftplib.FTP.connect | ||
| 194 | 194 | ||
| 195 | 195 | .. versionchanged:: 3.3 | |
| 196 | 196 | *source_address* parameter was added. | |
@@ -225,7 +225,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. | |||
| 225 | 225 | ||
| 226 | 226 | Send a simple command string to the server and return the response string. | |
| 227 | 227 | ||
| 228 | - .. audit-event:: ftplib.FTP.sendcmd "self cmd" | ||
| 228 | + .. audit-event:: ftplib.sendcmd self,cmd ftplib.FTP.sendcmd | ||
| 229 | 229 | ||
| 230 | 230 | ||
| 231 | 231 | .. method:: FTP.voidcmd(cmd) | |
@@ -234,7 +234,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. | |||
| 234 | 234 | nothing if a response code corresponding to success (codes in the range | |
| 235 | 235 | 200--299) is received. Raise :exc:`error_reply` otherwise. | |
| 236 | 236 | ||
| 237 | - .. audit-event:: ftplib.FTP.sendcmd "self cmd" | ||
| 237 | + .. audit-event:: ftplib.sendcmd self,cmd ftplib.FTP.voidcmd | ||
| 238 | 238 | ||
| 239 | 239 | ||
| 240 | 240 | .. method:: FTP.retrbinary(cmd, callback, blocksize=8192, rest=None) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -128,7 +128,7 @@ are always available. They are listed here in alphabetical order. | |||
| 128 | 128 | :func:`breakpoint` will automatically call that, allowing you to drop into | |
| 129 | 129 | the debugger of choice. | |
| 130 | 130 | ||
| 131 | - .. audit-event:: builtins.breakpoint "sys.breakpointhook" | ||
| 131 | + .. audit-event:: builtins.breakpoint breakpointhook breakpoint | ||
| 132 | 132 | ||
| 133 | 133 | .. versionadded:: 3.7 | |
| 134 | 134 | ||
@@ -277,7 +277,7 @@ are always available. They are listed here in alphabetical order. | |||
| 277 | 277 | If you want to parse Python code into its AST representation, see | |
| 278 | 278 | :func:`ast.parse`. | |
| 279 | 279 | ||
| 280 | - .. audit-event:: compile "source filename" | ||
| 280 | + .. audit-event:: compile source,filename compile | ||
| 281 | 281 | ||
| 282 | 282 | Raises an :ref:`auditing event <auditing>` ``compile`` with arguments | |
| 283 | 283 | ``source`` and ``filename``. This event may also be raised by implicit | |
@@ -490,7 +490,7 @@ are always available. They are listed here in alphabetical order. | |||
| 490 | 490 | See :func:`ast.literal_eval` for a function that can safely evaluate strings | |
| 491 | 491 | with expressions containing only literals. | |
| 492 | 492 | ||
| 493 | - .. audit-event:: exec code_object | ||
| 493 | + .. audit-event:: exec code_object eval | ||
| 494 | 494 | ||
| 495 | 495 | Raises an :ref:`auditing event <auditing>` ``exec`` with the code object | |
| 496 | 496 | as the argument. Code compilation events may also be raised. | |
@@ -525,7 +525,7 @@ are always available. They are listed here in alphabetical order. | |||
| 525 | 525 | builtins are available to the executed code by inserting your own | |
| 526 | 526 | ``__builtins__`` dictionary into *globals* before passing it to :func:`exec`. | |
| 527 | 527 | ||
| 528 | - .. audit-event:: exec code_object | ||
| 528 | + .. audit-event:: exec code_object exec | ||
| 529 | 529 | ||
| 530 | 530 | Raises an :ref:`auditing event <auditing>` ``exec`` with the code object | |
| 531 | 531 | as the argument. Code compilation events may also be raised. | |
@@ -779,12 +779,12 @@ are always available. They are listed here in alphabetical order. | |||
| 779 | 779 | If the :mod:`readline` module was loaded, then :func:`input` will use it | |
| 780 | 780 | to provide elaborate line editing and history features. | |
| 781 | 781 | ||
| 782 | - .. audit-event:: builtins.input prompt | ||
| 782 | + .. audit-event:: builtins.input prompt input | ||
| 783 | 783 | ||
| 784 | 784 | Raises an :ref:`auditing event <auditing>` ``builtins.input`` with | |
| 785 | 785 | argument ``prompt`` before reading input | |
| 786 | 786 | ||
| 787 | - .. audit-event:: builtins.input/result result | ||
| 787 | + .. audit-event:: builtins.input/result result input | ||
| 788 | 788 | ||
| 789 | 789 | Raises an auditing event ``builtins.input/result`` with the result after | |
| 790 | 790 | successfully reading input. | |
@@ -1222,7 +1222,7 @@ are always available. They are listed here in alphabetical order. | |||
| 1222 | 1222 | (where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile`, | |
| 1223 | 1223 | and :mod:`shutil`. | |
| 1224 | 1224 | ||
| 1225 | - .. audit-event:: open "file mode flags" | ||
| 1225 | + .. audit-event:: open file,mode,flags open | ||
| 1226 | 1226 | ||
| 1227 | 1227 | The ``mode`` and ``flags`` arguments may have been modified or inferred from | |
| 1228 | 1228 | the original call. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,7 +52,7 @@ For example, ``'[?]'`` matches the character ``'?'``. | |||
| 52 | 52 | more directories and subdirectories. If the pattern is followed by an | |
| 53 | 53 | ``os.sep``, only directories and subdirectories match. | |
| 54 | 54 | ||
| 55 | - .. audit-event:: glob.glob "pathname recursive" | ||
| 55 | + .. audit-event:: glob.glob pathname,recursive glob.glob | ||
| 56 | 56 | ||
| 57 | 57 | .. note:: | |
| 58 | 58 | Using the "``**``" pattern in large directory trees may consume | |
@@ -67,7 +67,7 @@ For example, ``'[?]'`` matches the character ``'?'``. | |||
| 67 | 67 | Return an :term:`iterator` which yields the same values as :func:`glob` | |
| 68 | 68 | without actually storing them all simultaneously. | |
| 69 | 69 | ||
| 70 | - .. audit-event:: glob.glob "pathname recursive" | ||
| 70 | + .. audit-event:: glob.glob pathname,recursive glob.iglob | ||
| 71 | 71 | ||
| 72 | 72 | ||
| 73 | 73 | .. function:: escape(pathname) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments