From 7145e4f1c9773302abd41c302ecf5f2e8b1b0938 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 29 Nov 2022 16:46:50 +0100 Subject: [PATCH 1/2] gh-98680: Add PyBUF_* constants to the Limiled API listing These were available in 3.11.0 with Py_LIMITED_API defined for 3.11, and are necessary to use the API. They should be considered part of the 3.11 Limited API. --- ...2-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst | 3 ++ Misc/stable_abi.toml | 44 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 Misc/NEWS.d/next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst diff --git a/Misc/NEWS.d/next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst b/Misc/NEWS.d/next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst new file mode 100644 index 000000000000000..012e72e0f230b45 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst @@ -0,0 +1,3 @@ +``PyBUF_*`` constants were marked as part of Limiled API of Python 3.11+. +These were available in 3.11.0 with :c:macro:`Py_LIMITED_API` defined for +3.11, and are necessary to use the buffer API. diff --git a/Misc/stable_abi.toml b/Misc/stable_abi.toml index aa12bcc85cebc7e..c716f403d638acf 100644 --- a/Misc/stable_abi.toml +++ b/Misc/stable_abi.toml @@ -2271,6 +2271,50 @@ [function.PyMemoryView_FromBuffer] added = '3.11' +# Constants for Py_buffer API added to this list in Python 3.11.1 (https://github.com/python/cpython/issues/98680) +# (they were available with 3.11.0) +[const.PyBUF_MAX_NDIM] + added = '3.11' +[const.PyBUF_SIMPLE] + added = '3.11' +[const.PyBUF_WRITABLE] + added = '3.11' +[const.PyBUF_FORMAT] + added = '3.11' +[const.PyBUF_ND] + added = '3.11' +[const.PyBUF_STRIDES] + added = '3.11' +[const.PyBUF_C_CONTIGUOUS] + added = '3.11' +[const.PyBUF_F_CONTIGUOUS] + added = '3.11' +[const.PyBUF_ANY_CONTIGUOUS] + added = '3.11' +[const.PyBUF_INDIRECT] + added = '3.11' +[const.PyBUF_CONTIG] + added = '3.11' +[const.PyBUF_CONTIG_RO] + added = '3.11' +[const.PyBUF_STRIDED] + added = '3.11' +[const.PyBUF_STRIDED_RO] + added = '3.11' +[const.PyBUF_RECORDS] + added = '3.11' +[const.PyBUF_RECORDS_RO] + added = '3.11' +[const.PyBUF_FULL] + added = '3.11' +[const.PyBUF_FULL_RO] + added = '3.11' +[const.PyBUF_READ] + added = '3.11' +[const.PyBUF_WRITE] + added = '3.11' + + # (Detailed comments aren't really needed for further entries: from here on # we can use version control logs.) From a82da9df8d0fd3aad75f7dac8691a35edd5bf9cd Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 5 Dec 2022 17:37:23 +0100 Subject: [PATCH 2/2] Fix typo --- .../next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst b/Misc/NEWS.d/next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst index 012e72e0f230b45..a87090168e065b1 100644 --- a/Misc/NEWS.d/next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst +++ b/Misc/NEWS.d/next/C API/2022-12-05-17-30-13.gh-issue-98680.FiMCxZ.rst @@ -1,3 +1,3 @@ -``PyBUF_*`` constants were marked as part of Limiled API of Python 3.11+. +``PyBUF_*`` constants were marked as part of Limited API of Python 3.11+. These were available in 3.11.0 with :c:macro:`Py_LIMITED_API` defined for 3.11, and are necessary to use the buffer API.