Skip to content

Commit 5bde996

Browse files
authored
gh-148233: Group stable_abi.toml entries per Python version (GH-157990)
1 parent 8672435 commit 5bde996

1 file changed

Lines changed: 61 additions & 20 deletions

File tree

‎Misc/stable_abi.toml‎

Lines changed: 61 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@
9595
windows = 'maybe'
9696

9797

98+
### Python 3.2 (initial version) ############################################
99+
98100
# Mentioned in PEP 384:
99101

100102
[struct.PyObject]
@@ -627,8 +629,6 @@
627629
added = '3.2'
628630
[function.PyErr_Display]
629631
added = '3.2'
630-
[function.PyErr_DisplayException]
631-
added = '3.12'
632632
[function.PyErr_ExceptionMatches]
633633
added = '3.2'
634634
[function.PyErr_Fetch]
@@ -735,8 +735,6 @@
735735
added = '3.2'
736736
[data.PyExc_BaseException]
737737
added = '3.2'
738-
[data.PyExc_BaseExceptionGroup]
739-
added = '3.11'
740738
[data.PyExc_BufferError]
741739
added = '3.2'
742740
[data.PyExc_BytesWarning]
@@ -1867,6 +1865,9 @@
18671865
[function.PyThread_start_new_thread]
18681866
added = '3.2'
18691867

1868+
1869+
### Python 3.3 ##############################################################
1870+
18701871
# The following were added in PC/python3.def in Python 3.3:
18711872
# 7800f75827b1be557be16f3b18f5170fbf9fae08
18721873
# 9c56409d3353b8cd4cfc19e0467bbe23fd34fc92
@@ -1896,6 +1897,9 @@
18961897
[function.PyThread_GetInfo]
18971898
added = '3.3'
18981899

1900+
1901+
### Python 3.4 ##############################################################
1902+
18991903
# The following were added in PC/python3.def in Python 3.4:
19001904
# 3ba3a3ee56c142e93d6bbe20ff6bf939212a30f0
19011905

@@ -1904,6 +1908,9 @@
19041908
[function.PyType_GetSlot]
19051909
added = '3.4'
19061910

1911+
1912+
### Python 3.5 ##############################################################
1913+
19071914
# The following were added in PC/python3.def in Python 3.5:
19081915
# 11d7b1423fc44d764eba7065ea5eba58ed748b21
19091916
# f3b73ad51da3097d7915796fdc62608b1ab90c0a
@@ -1942,6 +1949,9 @@
19421949
[const.Py_tp_finalize]
19431950
added = '3.5'
19441951

1952+
1953+
### Python 3.6 ##############################################################
1954+
19451955
# The following were added in PC/python3.def in Python 3.6:
19461956

19471957
[function.Py_FinalizeEx]
@@ -1956,6 +1966,9 @@
19561966
[data.PyExc_ModuleNotFoundError]
19571967
added = '3.6'
19581968

1969+
1970+
### Python 3.7 ##############################################################
1971+
19591972
# The following were added in PC/python3.def in Python 3.6.1 and 3.5.3/3.5.4:
19601973

19611974
[function.PyCodec_NameReplaceErrors]
@@ -2151,6 +2164,9 @@
21512164
[const.METH_METHOD]
21522165
added = '3.7'
21532166

2167+
2168+
### Python 3.8 ##############################################################
2169+
21542170
# The following were added in PC/python3.def in Python 3.8:
21552171

21562172
[function.PyImport_GetModule]
@@ -2174,11 +2190,14 @@
21742190
[function.Py_BytesMain]
21752191
added = '3.8'
21762192

2177-
# New type flag (PEP 590):
2193+
# New type flag in Python 3.8 (PEP 590):
21782194

21792195
[const.Py_TPFLAGS_METHOD_DESCRIPTOR]
21802196
added = '3.8'
21812197

2198+
2199+
### Python 3.9 ##############################################################
2200+
21822201
# The following were added in PC/python3.def in Python 3.9:
21832202

21842203
[function.Py_EnterRecursiveCall]
@@ -2198,6 +2217,9 @@
21982217
[function.PyObject_GC_IsTracked]
21992218
added = '3.9'
22002219

2220+
2221+
### Python 3.10 #############################################################
2222+
22012223
# The following were added in PC/python3.def in Python 3.10:
22022224

22032225
[function.Py_GetArgcArgv]
@@ -2262,7 +2284,11 @@
22622284
[data.PyExc_EncodingWarning]
22632285
added = '3.10'
22642286

2265-
# Support for Stable ABI in debug builds
2287+
# Added in 3.7 but in the Stable ABI from 3.10
2288+
[const.METH_FASTCALL]
2289+
added = '3.10'
2290+
2291+
# Support for Stable ABI in debug builds (Python 3.10)
22662292

22672293
[data._Py_RefTotal]
22682294
added = '3.10'
@@ -2273,13 +2299,13 @@
22732299
ifdef = 'Py_REF_DEBUG'
22742300
abi_only = true
22752301

2276-
# New slots in 3.10:
2302+
# New slots in Python 3.10:
22772303

22782304
[const.Py_am_send]
22792305
added = '3.10'
22802306

22812307

2282-
# New GC control functions in Py3.10 (https://bugs.python.org/issue28254)
2308+
# New GC control functions in Python 3.10 (https://github.com/python/cpython/issues/72441)
22832309

22842310
[function.PyGC_Disable]
22852311
added = '3.10'
@@ -2288,19 +2314,18 @@
22882314
[function.PyGC_IsEnabled]
22892315
added = '3.10'
22902316

2291-
# Add new C API in Python 3.11
22922317

2318+
### Python 3.11 #############################################################
2319+
2320+
[data.PyExc_BaseExceptionGroup]
2321+
added = '3.11'
22932322
[function.PyType_GetName]
22942323
added = '3.11'
22952324
[function.PyType_GetQualName]
22962325
added = '3.11'
22972326
[data.PyStructSequence_UnnamedField]
22982327
added = '3.11'
22992328

2300-
# Added in 3.7 but in the Stable ABI from 3.10
2301-
[const.METH_FASTCALL]
2302-
added = '3.10'
2303-
23042329
# Add stable Py_buffer API in Python 3.11 (https://bugs.python.org/issue45459)
23052330
[struct.Py_buffer]
23062331
added = '3.11'
@@ -2379,7 +2404,6 @@
23792404
[const.PyBUF_WRITE]
23802405
added = '3.11'
23812406

2382-
23832407
# (Detailed comments aren't really needed for further entries: from here on
23842408
# we can use version control logs.)
23852409

@@ -2390,6 +2414,11 @@
23902414
[function.PyErr_SetHandledException]
23912415
added = '3.11'
23922416

2417+
2418+
### Python 3.12 #############################################################
2419+
2420+
[function.PyErr_DisplayException]
2421+
added = '3.12'
23932422
[function.PyType_FromMetaclass]
23942423
added = '3.12'
23952424
[const.Py_TPFLAGS_HAVE_VECTORCALL]
@@ -2473,6 +2502,9 @@
24732502
# Note: value changed in 3.15 (old value is still accepted)
24742503
added = '3.12'
24752504

2505+
2506+
### Python 3.13 #############################################################
2507+
24762508
[function.PyImport_AddModuleRef]
24772509
added = '3.13'
24782510
[function.PyWeakref_GetRef]
@@ -2555,6 +2587,9 @@
25552587
# Note: value changed in 3.15 (old value is still accepted)
25562588
added = '3.13'
25572589

2590+
2591+
### Python 3.14 #############################################################
2592+
25582593
[function.Py_TYPE]
25592594
# Before 3.14, this was a macro that accessed the PyObject member
25602595
added = '3.14'
@@ -2616,6 +2651,9 @@
26162651
[function.Py_PACK_VERSION]
26172652
added = '3.14'
26182653

2654+
2655+
### Python 3.15 #############################################################
2656+
26192657
[function.PySys_GetAttr]
26202658
added = '3.15'
26212659
[function.PySys_GetAttrString]
@@ -2773,10 +2811,10 @@
27732811
added = '3.15'
27742812
[const.Py_tp_module]
27752813
added = '3.15'
2776-
[function.Py_HashBuffer]
2777-
added = '3.16'
2814+
[function.PyObject_CallFinalizerFromDealloc]
2815+
added = '3.15'
27782816

2779-
# PEP 757 import/export API.
2817+
# Python 3.15 PEP 757 import/export API.
27802818

27812819
[function.PyLong_GetNativeLayout]
27822820
added = '3.15'
@@ -2802,7 +2840,7 @@
28022840
# (The definition of 'full-abi' was clarified when this entry was added.)
28032841
struct_abi_kind = 'full-abi'
28042842

2805-
# PEP 788 finalization protection
2843+
# Python 3.15 PEP 788 finalization protection
28062844

28072845
[struct.PyInterpreterGuard]
28082846
added = '3.15'
@@ -2832,5 +2870,8 @@
28322870
added = '3.15'
28332871
struct_abi_kind = 'opaque'
28342872

2835-
[function.PyObject_CallFinalizerFromDealloc]
2836-
added = '3.15'
2873+
2874+
### Python 3.16 #############################################################
2875+
2876+
[function.Py_HashBuffer]
2877+
added = '3.16'

0 commit comments

Comments
 (0)