Skip to content

gh-158916: Clarify mode in os.open audit events - #159847

Open
limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-158916-open-audit-docs
Open

limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-158916-open-audit-docs

Conversation

@limadog9

@limadog9 limadog9 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Clarify that the open audit event raised by os.open() always supplies None for its mode field. Access modes are available through flags, while the file creation permission bits passed as the function's mode parameter are not included in the event.

Fixes #158916.

Validation:

  • Captured audit events on the current CPython debug build for builtin binary open(), read-only os.open(), and os.open() with file creation permissions; checked the mode and access flags.
  • Full HTML documentation build with warnings treated as errors.
  • Sphinx lint and patchcheck.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35258685 | 📁 Comparing a1182d0 against main (6044c62)

  🔍 Preview build  

1 file changed
± library/os.html

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

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

"open" audit event "mode" does not contain information for os.open calls

1 participant