Skip to content

gh-159379: Add audit events for sys.monitoring tool ID cleanup - #162015

Open
beanscrazyxd wants to merge 2 commits into
python:mainfrom
beanscrazyxd:audit-monitoring-tool-clear-free
Open

beanscrazyxd wants to merge 2 commits into
python:mainfrom
beanscrazyxd:audit-monitoring-tool-clear-free

Conversation

@beanscrazyxd

Copy link
Copy Markdown

Add sys.audit events when a sys.monitoring tool ID is cleared or freed.

The events are emitted before the state changes, carry the tool ID as their sole argument, and allow audit hooks to reject the operation. Document both events and add a subprocess regression test.

Issue: gh-159379

The focused audit regression test passed: ./python.exe -m test -v test_audit -m test_sys_monitoring_clear_free_tool_id. git diff --check also passed.

@python-cla-bot

python-cla-bot Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35902185 | 📁 Comparing f6dbe62 against main (b968417)

  🔍 Preview build  

7 files changed · ± 7 modified

± Modified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant