Skip to content

Commit f247387

Browse files
authored
gh-98680: Add PyBUF_* constants to the Limited API listing (GH-100018)
``PyBUF_*`` constants are marked as part of Limited API of Python 3.11+. These were available in 3.11.0 with `Py_LIMITED_API` defined for 3.11, and are necessary to use the buffer API. Omitting them in `stable_abi.toml` was a mistake.
1 parent 922a6cf commit f247387

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``PyBUF_*`` constants were marked as part of Limited API of Python 3.11+.
2+
These were available in 3.11.0 with :c:macro:`Py_LIMITED_API` defined for
3+
3.11, and are necessary to use the buffer API.

Misc/stable_abi.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,50 @@
22712271
[function.PyMemoryView_FromBuffer]
22722272
added = '3.11'
22732273

2274+
# Constants for Py_buffer API added to this list in Python 3.11.1 (https://github.com/python/cpython/issues/98680)
2275+
# (they were available with 3.11.0)
2276+
[const.PyBUF_MAX_NDIM]
2277+
added = '3.11'
2278+
[const.PyBUF_SIMPLE]
2279+
added = '3.11'
2280+
[const.PyBUF_WRITABLE]
2281+
added = '3.11'
2282+
[const.PyBUF_FORMAT]
2283+
added = '3.11'
2284+
[const.PyBUF_ND]
2285+
added = '3.11'
2286+
[const.PyBUF_STRIDES]
2287+
added = '3.11'
2288+
[const.PyBUF_C_CONTIGUOUS]
2289+
added = '3.11'
2290+
[const.PyBUF_F_CONTIGUOUS]
2291+
added = '3.11'
2292+
[const.PyBUF_ANY_CONTIGUOUS]
2293+
added = '3.11'
2294+
[const.PyBUF_INDIRECT]
2295+
added = '3.11'
2296+
[const.PyBUF_CONTIG]
2297+
added = '3.11'
2298+
[const.PyBUF_CONTIG_RO]
2299+
added = '3.11'
2300+
[const.PyBUF_STRIDED]
2301+
added = '3.11'
2302+
[const.PyBUF_STRIDED_RO]
2303+
added = '3.11'
2304+
[const.PyBUF_RECORDS]
2305+
added = '3.11'
2306+
[const.PyBUF_RECORDS_RO]
2307+
added = '3.11'
2308+
[const.PyBUF_FULL]
2309+
added = '3.11'
2310+
[const.PyBUF_FULL_RO]
2311+
added = '3.11'
2312+
[const.PyBUF_READ]
2313+
added = '3.11'
2314+
[const.PyBUF_WRITE]
2315+
added = '3.11'
2316+
2317+
22742318
# (Detailed comments aren't really needed for further entries: from here on
22752319
# we can use version control logs.)
22762320

0 commit comments

Comments
 (0)