bpo-41192: Add documentation to some undocumented audit events#21308
Conversation
- Document `builtins.id`, `ctypes.PyObj_FromPtr`, `function.__new__`, `object.__getattr__`, `object.__setattr__`, `object.__delattr__`, `setopencodehook` and `_winapi` events - Explain when `code.__new__`, `function.__new__`, `object.__getattr__`, `object.__setattr__`, `object.__delattr__` are raised - Add a section in `audit_events.rst` to place internal audit events without corresponding documentation sections
akuchling
left a comment
There was a problem hiding this comment.
Looks good to me. The documentation formats correctly, and the new entries result in table rows that link to the correct anchors on their destination page. I also dug around in the C source with grep to look for other undocumented event types, but didn't find any.
| +--------------------------+-------------------------------------------+ | ||
| | _winapi.TerminateProcess | ``handle``, ``exit_code`` | | ||
| +--------------------------+-------------------------------------------+ | ||
| | ctypes.PyObj_FromPtr | ``ob`` | |
There was a problem hiding this comment.
One note -- these aren't named parameters, right? The C variable with the value is named "ob" in the source code, but would this be clearer as "obj"? @gousaiyang: what do you think? If you prefer to leave it as-is, I can go ahead and merge this.
There was a problem hiding this comment.
Yes, these parameters are positional-only under the hood. And naming it as obj is indeed clearer. I've made the change. Thanks for your review!
|
Thanks @gousaiyang for the PR, and @akuchling for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
|
GH-22831 is a backport of this pull request to the 3.9 branch. |
|
GH-22832 is a backport of this pull request to the 3.8 branch. |
builtins.id,ctypes.PyObj_FromPtr,function.__new__,object.__getattr__,object.__setattr__,object.__delattr__,setopencodehookand_winapieventscode.__new__,function.__new__,object.__getattr__,object.__setattr__,object.__delattr__are raisedaudit_events.rstto place internal audit events without corresponding documentation sectionshttps://bugs.python.org/issue41192