From 4b223dff053d62c71ebbd7f79ff5924f32113af6 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Mon, 19 Oct 2026 20:32:08 -0400 Subject: [PATCH] gh-141004: Document `PY_AUDIT_READ` (GH-159720) (cherry picked from commit 34fe59b878335856ddfec5137fc989f4ec36a973) Co-authored-by: Peter Bierma Co-authored-by: Petr Viktorin --- Doc/c-api/structures.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 1ddde5d136b3bb1..f281f2e8328beac 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -760,11 +760,20 @@ The following flags can be used with :c:member:`PyMemberDef.flags`: .. versionchanged:: 3.12 The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. - The :c:macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. + The :c:macro:`PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new names are now always available. Previously, these required ``#include "structmember.h"``. The header is still available and it provides the old names. +.. c:macro:: PY_AUDIT_READ + + Soft-deprecated alias of :c:macro:`Py_AUDIT_READ` (note capitalization of + the ``y``). + Only available with ``#include "structmember.h"``. + + .. soft-deprecated:: 3.12 + Use :c:macro:`Py_AUDIT_READ` instead. + .. _PyMemberDef-types: Member types