bpo-37363: Add audit events on startup for the run commands#14524
bpo-37363: Add audit events on startup for the run commands#14524zooba merged 13 commits intopython:masterfrom
Conversation
|
Fantastic! This simplifies one of my PoCs for EP a lot. Are these all entry points or is there another entry point for embedded Python interpreters? |
|
There are definitely more entry points, but if someone else is embedding it then they have full control and audit hooks won't help :) |
| read, so that you can set this hook there. The :mod:`site` module | ||
| :ref:`sets this <rlcompleter-config>`. | ||
|
|
||
| .. audit-event:: cpython.run_interactivehook hook sys.__interactivehook__ |
There was a problem hiding this comment.
I don't understand the audit-event syntax. The event takes one argument (hook), but the audit-event has two arguments. What's going on here?
There was a problem hiding this comment.
I need to document the syntax somewhere...
Basically, it's:
.. audit-event:: event-name list,of,comma,separated,args anchor
Where the anchor is used for the backlink from the generated table (which appears to not be generating right now...).
|
I can't repro the Azure Pipelines failures locally (on Windows or Ubuntu), so I'm guessing it's environment related. Making one more guess before I start adding lots of diagnostic info :) |
|
Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
GH-14536 is a backport of this pull request to the 3.8 branch. |
https://bugs.python.org/issue37363