From b87697543c1b3494148352563a217bb297d339fa Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Mon, 19 Oct 2026 13:16:41 -0400 Subject: [PATCH 1/3] Document PY_AUDIT_READ --- Doc/c-api/structures.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 1ddde5d136b3bb1..1d7587720d112d9 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -760,11 +760,18 @@ 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 + + Alias to :c:macro:`Py_AUDIT_READ`. + + .. soft-deprecated:: 3.12 + Use :c:macro:`Py_AUDIT_READ` instead. + .. _PyMemberDef-types: Member types From e1bfca0f06ec9a3e61e6214eaa6e1931dcd030d0 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Mon, 19 Oct 2026 17:24:32 -0400 Subject: [PATCH 2/3] Update Doc/c-api/structures.rst Co-authored-by: Petr Viktorin --- Doc/c-api/structures.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 1d7587720d112d9..f83d41fe3716260 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -767,7 +767,9 @@ The following flags can be used with :c:member:`PyMemberDef.flags`: .. c:macro:: PY_AUDIT_READ - Alias to :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. From 26c678b0e0d3c3beceeb899d5cb2e269cd25bd67 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Mon, 19 Oct 2026 18:01:08 -0400 Subject: [PATCH 3/3] Fix stupid lint. --- Doc/c-api/structures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index f83d41fe3716260..f281f2e8328beac 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -769,7 +769,7 @@ The following flags can be used with :c:member:`PyMemberDef.flags`: Soft-deprecated alias of :c:macro:`Py_AUDIT_READ` (note capitalization of the ``y``). - Only available with ``#include "structmember.h"``. + Only available with ``#include "structmember.h"``. .. soft-deprecated:: 3.12 Use :c:macro:`Py_AUDIT_READ` instead.