Skip to content

bpo-37363: Add audit events on startup for the run commands #14524

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

Merged
merged 13 commits into from
Jul 1, 2019

Conversation

zooba
Copy link
Member

@zooba zooba commented Jul 1, 2019

@tiran
Copy link
Member

tiran commented Jul 1, 2019

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?

@tiran tiran self-assigned this Jul 1, 2019
@zooba
Copy link
Member Author

zooba commented Jul 1, 2019

There are definitely more entry points, but if someone else is embedding it then they have full control and audit hooks won't help :)

@@ -905,6 +905,12 @@ always available.
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__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...).

@zooba
Copy link
Member Author

zooba commented Jul 1, 2019

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 :)

@zooba zooba merged commit e226e83 into python:master Jul 1, 2019
@miss-islington
Copy link
Contributor

Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@zooba zooba deleted the bpo-37363 branch July 1, 2019 23:03
@bedevere-bot
Copy link

GH-14536 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 1, 2019
…-14524)

(cherry picked from commit e226e83)

Co-authored-by: Steve Dower <steve.dower@python.org>
miss-islington added a commit that referenced this pull request Jul 1, 2019
(cherry picked from commit e226e83)

Co-authored-by: Steve Dower <steve.dower@python.org>
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
@zooba zooba mentioned this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants