Skip to content

Commit 76bdfa4

Browse files
authored
GH-122085: Use include files for C API deprecations (#109843)
1 parent 046670c commit 76bdfa4

7 files changed

+121
-181
lines changed

Diff for: Doc/deprecations/c-api-pending-removal-in-3.14.rst

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Pending Removal in Python 3.14
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules
5+
(:pep:`699`; :gh:`101193`).
6+
7+
* Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
8+
bases (:gh:`95388`).
9+
10+
* Functions to configure Python's initialization, deprecated in Python 3.11:
11+
12+
* ``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead.
13+
* ``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead.
14+
* ``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead.
15+
* ``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead.
16+
17+
The :c:func:`Py_InitializeFromConfig` API should be used with
18+
:c:type:`PyConfig` instead.
19+
20+
* Global configuration variables:
21+
22+
* :c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug` instead.
23+
* :c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose` instead.
24+
* :c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet` instead.
25+
* :c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive` instead.
26+
* :c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect` instead.
27+
* :c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level` instead.
28+
* :c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import` instead.
29+
* :c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning` instead.
30+
* :c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings` instead.
31+
* :c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment` instead.
32+
* :c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode` instead.
33+
* :c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory` instead.
34+
* :c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio` instead.
35+
* :c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed`
36+
and :c:member:`PyConfig.hash_seed` instead.
37+
* :c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated` instead.
38+
* :c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig.legacy_windows_fs_encoding` instead.
39+
* :c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig.legacy_windows_stdio` instead.
40+
* :c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding` instead.
41+
* :c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding` instead.
42+
* :c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig.filesystem_errors` instead.
43+
* :c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` instead. (see :c:func:`Py_PreInitialize`)
44+
45+
The :c:func:`Py_InitializeFromConfig` API should be used with
46+
:c:type:`PyConfig` instead.

Diff for: Doc/deprecations/c-api-pending-removal-in-3.15.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Pending Removal in Python 3.15
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The bundled copy of ``libmpdecimal``.
5+
* :c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule` instead.
6+
* :c:func:`PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef` instead.
7+
* :c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef` instead.
8+
* :c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead.
9+
* :c:type:`Py_UNICODE` type: use :c:type:`wchar_t` instead.
10+
* Python initialization functions:
11+
12+
* :c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and
13+
:data:`!warnings.filters` instead.
14+
* :c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead.
15+
* :c:func:`Py_GetPath`: get :data:`sys.path` instead.
16+
* :c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead.
17+
* :c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead.
18+
* :c:func:`Py_GetProgramName`: get :data:`sys.executable` instead.
19+
* :c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or
20+
the :envvar:`PYTHONHOME` environment variable instead.

Diff for: Doc/deprecations/c-api-pending-removal-in-future.rst

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pending Removal in Future Versions
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
The following APIs are deprecated and will be removed,
5+
although there is currently no date scheduled for their removal.
6+
7+
* :c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8.
8+
* :c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException` instead.
9+
* :c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException` instead.
10+
* :c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException` instead.
11+
* :c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject` instead.
12+
* :c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child` instead.
13+
* :c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices` instead.
14+
* :c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode` instead.
15+
* :c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode` instead.
16+
* :c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode` instead.
17+
* :c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode` instead.
18+
* :c:func:`PyUnicode_READY`: unneeded since Python 3.12
19+
* :c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException` instead.
20+
* :c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1`` instead.
21+
* :c:member:`!PyBytesObject.ob_shash` member:
22+
call :c:func:`PyObject_Hash` instead.
23+
* :c:member:`!PyDictObject.ma_version_tag` member.
24+
* Thread Local Storage (TLS) API:
25+
26+
* :c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc` instead.
27+
* :c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free` instead.
28+
* :c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set` instead.
29+
* :c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get` instead.
30+
* :c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete` instead.
31+
* :c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7.

Diff for: Doc/deprecations/index.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
Deprecations
22
============
33

4-
.. include:: pending-removal-in-3.14.rst
5-
64
.. include:: pending-removal-in-3.15.rst
75

86
.. include:: pending-removal-in-3.16.rst
97

108
.. include:: pending-removal-in-future.rst
9+
10+
C API Deprecations
11+
------------------
12+
13+
.. include:: c-api-pending-removal-in-3.15.rst
14+
15+
.. include:: c-api-pending-removal-in-future.rst

Diff for: Doc/whatsnew/3.12.rst

+4-83
Original file line numberDiff line numberDiff line change
@@ -2210,92 +2210,13 @@ Deprecated
22102210
overrides :c:member:`~PyTypeObject.tp_new` is deprecated.
22112211
Call the metaclass instead.
22122212

2213-
Pending Removal in Python 3.14
2214-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2213+
.. Add deprecations above alphabetically, not here at the end.
22152214
2216-
* The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules
2217-
(:pep:`699`; :gh:`101193`).
2215+
.. include:: ../deprecations/c-api-pending-removal-in-3.14.rst
22182216

2219-
* Global configuration variables:
2217+
.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
22202218

2221-
* :c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`
2222-
* :c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`
2223-
* :c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`
2224-
* :c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`
2225-
* :c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`
2226-
* :c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`
2227-
* :c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`
2228-
* :c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`
2229-
* :c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`
2230-
* :c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`
2231-
* :c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`
2232-
* :c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`
2233-
* :c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`
2234-
* :c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed`
2235-
and :c:member:`PyConfig.hash_seed`
2236-
* :c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`
2237-
* :c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig.legacy_windows_fs_encoding`
2238-
* :c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig.legacy_windows_stdio`
2239-
* :c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding`
2240-
* :c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding`
2241-
* :c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig.filesystem_errors`
2242-
* :c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:`Py_PreInitialize`)
2243-
2244-
The :c:func:`Py_InitializeFromConfig` API should be used with
2245-
:c:type:`PyConfig` instead.
2246-
2247-
* Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
2248-
bases (:gh:`95388`).
2249-
2250-
Pending Removal in Python 3.15
2251-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2252-
2253-
* :c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule`
2254-
* :c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t`
2255-
* :c:type:`Py_UNICODE` type: use :c:type:`wchar_t`
2256-
* Python initialization functions:
2257-
2258-
* :c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and
2259-
:data:`!warnings.filters`
2260-
* :c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix`
2261-
* :c:func:`Py_GetPath`: get :data:`sys.path`
2262-
* :c:func:`Py_GetPrefix`: get :data:`sys.prefix`
2263-
* :c:func:`Py_GetProgramFullPath`: get :data:`sys.executable`
2264-
* :c:func:`Py_GetProgramName`: get :data:`sys.executable`
2265-
* :c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or
2266-
the :envvar:`PYTHONHOME` environment variable
2267-
2268-
Pending Removal in Future Versions
2269-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2270-
2271-
The following APIs are deprecated and will be removed,
2272-
although there is currently no date scheduled for their removal.
2273-
2274-
* :c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8
2275-
* :c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException`
2276-
* :c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException`
2277-
* :c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException`
2278-
* :c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject`
2279-
* :c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child`
2280-
* :c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices`
2281-
* :c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode`
2282-
* :c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode`
2283-
* :c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode`
2284-
* :c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode`
2285-
* :c:func:`PyUnicode_READY`: unneeded since Python 3.12
2286-
* :c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException`
2287-
* :c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1``
2288-
* :c:member:`!PyBytesObject.ob_shash` member:
2289-
call :c:func:`PyObject_Hash` instead
2290-
* :c:member:`!PyDictObject.ma_version_tag` member
2291-
* Thread Local Storage (TLS) API:
2292-
2293-
* :c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc`
2294-
* :c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free`
2295-
* :c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set`
2296-
* :c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get`
2297-
* :c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete`
2298-
* :c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7
2219+
.. include:: ../deprecations/c-api-pending-removal-in-future.rst
22992220

23002221
Removed
23012222
-------

Diff for: Doc/whatsnew/3.13.rst

+7-96
Original file line numberDiff line numberDiff line change
@@ -2208,6 +2208,9 @@ Removed C APIs
22082208
be used instead.
22092209
(Contributed by Serhiy Storchaka in :gh:`86493`.)
22102210

2211+
* Remove undocumented ``PY_TIMEOUT_MAX`` constant from the limited C API.
2212+
(Contributed by Victor Stinner in :gh:`110014`.)
2213+
22112214
Deprecated C APIs
22122215
-----------------
22132216

@@ -2249,105 +2252,13 @@ Deprecated C APIs
22492252
Refer to the deprecation notices on each function for their recommended replacements.
22502253
(Soft deprecated as part of :pep:`667`.)
22512254

2252-
Pending Removal in Python 3.14
2253-
------------------------------
2254-
2255-
* Creating immutable types (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable
2256-
bases using the C API.
2257-
2258-
* Functions to configure the Python initialization, deprecated in Python 3.11:
2259-
2260-
* ``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead.
2261-
* ``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead.
2262-
* ``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead.
2263-
* ``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead.
2264-
2265-
The :c:func:`Py_InitializeFromConfig` API should be used with
2266-
:c:type:`PyConfig` instead.
2267-
2268-
* Global configuration variables:
2269-
2270-
* :c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`
2271-
* :c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`
2272-
* :c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`
2273-
* :c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`
2274-
* :c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`
2275-
* :c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`
2276-
* :c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`
2277-
* :c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`
2278-
* :c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`
2279-
* :c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`
2280-
* :c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`
2281-
* :c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`
2282-
* :c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`
2283-
* :c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed`
2284-
and :c:member:`PyConfig.hash_seed`
2285-
* :c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`
2286-
* :c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig.legacy_windows_fs_encoding`
2287-
* :c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig.legacy_windows_stdio`
2288-
* :c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding`
2289-
* :c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding`
2290-
* :c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig.filesystem_errors`
2291-
* :c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:`Py_PreInitialize`)
2292-
2293-
The :c:func:`Py_InitializeFromConfig` API should be used with
2294-
:c:type:`PyConfig` instead.
2295-
2296-
Pending Removal in Python 3.15
2297-
------------------------------
2298-
2299-
* The bundled copy of ``libmpdecimal``.
2300-
* :c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule`.
2301-
* :c:func:`PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef` instead.
2302-
* :c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef` instead.
2303-
* :c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead.
2304-
* :c:type:`Py_UNICODE` type: use :c:type:`wchar_t` instead.
2305-
* Python initialization functions:
2306-
2307-
* :c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and
2308-
:data:`!warnings.filters` instead.
2309-
* :c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead.
2310-
* :c:func:`Py_GetPath`: get :data:`sys.path` instead.
2311-
* :c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead.
2312-
* :c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead.
2313-
* :c:func:`Py_GetProgramName`: get :data:`sys.executable` instead.
2314-
* :c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or
2315-
:envvar:`PYTHONHOME` environment variable instead.
2255+
.. Add deprecations above alphabetically, not here at the end.
23162256
2317-
Pending Removal in Future Versions
2318-
----------------------------------
2319-
2320-
The following APIs were deprecated in earlier Python versions and will be
2321-
removed, although there is currently no date scheduled for their removal.
2322-
2323-
* :c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: no needed since Python 3.8.
2324-
* :c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException`.
2325-
* :c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException`.
2326-
* :c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException`.
2327-
* :c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject`.
2328-
* :c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child()`.
2329-
* :c:func:`PySlice_GetIndicesEx`.
2330-
* :c:func:`!PyUnicode_AsDecodedObject`.
2331-
* :c:func:`!PyUnicode_AsDecodedUnicode`.
2332-
* :c:func:`!PyUnicode_AsEncodedObject`.
2333-
* :c:func:`!PyUnicode_AsEncodedUnicode`.
2334-
* :c:func:`PyUnicode_READY`: not needed since Python 3.12.
2335-
* :c:func:`!_PyErr_ChainExceptions`.
2336-
* :c:member:`!PyBytesObject.ob_shash` member:
2337-
call :c:func:`PyObject_Hash` instead.
2338-
* :c:member:`!PyDictObject.ma_version_tag` member.
2339-
* TLS API:
2340-
2341-
* :c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc`.
2342-
* :c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free`.
2343-
* :c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set`.
2344-
* :c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get`.
2345-
* :c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete`.
2346-
* :c:func:`PyThread_ReInitTLS`: no longer needed.
2257+
.. include:: ../deprecations/c-api-pending-removal-in-3.14.rst
23472258

2348-
* Remove undocumented ``PY_TIMEOUT_MAX`` constant from the limited C API.
2349-
(Contributed by Victor Stinner in :gh:`110014`.)
2259+
.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
23502260

2261+
.. include:: ../deprecations/c-api-pending-removal-in-future.rst
23512262

23522263
Regression Test Changes
23532264
=======================

Diff for: Doc/whatsnew/3.14.rst

+6
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,12 @@ Deprecated
422422
:c:macro:`!isfinite` available from :file:`math.h`
423423
since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)
424424

425+
.. Add deprecations above alphabetically, not here at the end.
426+
427+
.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
428+
429+
.. include:: ../deprecations/c-api-pending-removal-in-future.rst
430+
425431
Removed
426432
-------
427433

0 commit comments

Comments
 (0)