This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lunixbochs2
Recipients ammar2, christian.heimes, lunixbochs2, steve.dower, vstinner
Date 2021-01-10.01:46:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610243164.31.0.598948519852.issue42800@roundup.psfhosted.org>
In-reply-to
Content
PR submitted, waiting on CLA process.

I added documentation at the field sites, but the audit event table generation does not handle attributes or object.__getattr__ very well at all, so I'm not updating the audit table for now.

The `.. audit-event:: object.__getattr__ obj,name frame-objects` sphinx directive right now just inserts a canned string """Raises an :ref:`auditing event <auditing>` object.__getattr__ with arguments obj,name.""", which would need additional boilerplate to describe these attributes properly. It also only adds a footnote style link to the audit table under __getattr__, and even moves object.__getattribute__ from the first [1] link position to a later number which is IMO is more confusing than not even linking them.

I think to make attributes look good in the table we would need a special sphinx directive for audited object.__getattr__ attributes, for example by modifying the template generator to fit each attribute on its own line under  object.__getattr__ in the table.

For now I did not use the audit-event sphinx directive and manually inserted strings like this near the original attribute description in the docs: """Accessing ``f_code`` raises an :ref:`auditing event <auditing>` ``object.__getattr__`` with arguments ``obj`` and ``"f_code"``."""

I think audit table improvements should be handled in a separate issue, and by someone more familiar with that part of the doc generator, as cleaning it up looks like maybe a bigger scope than the current contribution.
History
Date User Action Args
2021-01-10 01:46:04lunixbochs2setrecipients: + lunixbochs2, vstinner, christian.heimes, steve.dower, ammar2
2021-01-10 01:46:04lunixbochs2setmessageid: <1610243164.31.0.598948519852.issue42800@roundup.psfhosted.org>
2021-01-10 01:46:04lunixbochs2linkissue42800 messages
2021-01-10 01:46:03lunixbochs2create