diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-07-22 11:36:57 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-22 11:36:57 (GMT) |
| commit | 148beb6de904121350babeeee169ba0919a73371 (patch) | |
| tree | a5323770ce37a44bc534ec8ffd48f598a45741fa /Lib/_pyrepl/main.py | |
| parent | 82db81528c0e66d88d252e6a0eb4d9b1e686535a (diff) | |
| download | cpython-148beb6de904121350babeeee169ba0919a73371.zip cpython-148beb6de904121350babeeee169ba0919a73371.tar.gz cpython-148beb6de904121350babeeee169ba0919a73371.tar.bz2 | |
[3.13] gh-121957: Emit audit events for `python -i` and `python -m asyncio` (GH-121958) (GH-122115)
Relatedly, emit the `cpython.run_startup` event from the Python version of
`PYTHONSTARTUP` handling.
(cherry picked from commit dc93d1125f594ac7aece98558eaf33d09c348519)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/_pyrepl/main.py')
| -rw-r--r-- | Lib/_pyrepl/main.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/_pyrepl/main.py b/Lib/_pyrepl/main.py index 8d6e07d..a6f824d 100644 --- a/Lib/_pyrepl/main.py +++ b/Lib/_pyrepl/main.py @@ -39,6 +39,8 @@ def interactive_console(mainmodule=None, quiet=False, pythonstartup=False): # sys._baserepl() above does this internally, we do it here startup_path = os.getenv("PYTHONSTARTUP") if pythonstartup and startup_path: + sys.audit("cpython.run_startup", startup_path) + import tokenize with tokenize.open(startup_path) as f: startup_code = compile(f.read(), startup_path, "exec") |
