-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-41192: Add documentation to some undocumented audit events #21308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Doc/library/audit_events.rst
Outdated
+--------------------------+-------------------------------------------+ | ||
| _winapi.TerminateProcess | ``handle``, ``exit_code`` | | ||
+--------------------------+-------------------------------------------+ | ||
| ctypes.PyObj_FromPtr | ``ob`` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
…1308) (cherry picked from commit 3f7e990) Co-authored-by: Saiyang Gou <[email protected]>
GH-22831 is a backport of this pull request to the 3.9 branch. |
…1308) (cherry picked from commit 3f7e990) Co-authored-by: Saiyang Gou <[email protected]>
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__
,setopencodehook
and_winapi
eventscode.__new__
,function.__new__
,object.__getattr__
,object.__setattr__
,object.__delattr__
are raisedaudit_events.rst
to place internal audit events without corresponding documentation sectionshttps://bugs.python.org/issue41192