Skip to content

Commit bbeb219

Browse files
authored
Complete doc of pending C API removals in Python 3.15 (#129032)
1 parent d57b2d8 commit bbeb219

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

Doc/c-api/init.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
109109

110110
Set by the :option:`-b` option.
111111

112-
.. deprecated-removed:: 3.12 3.14
112+
.. deprecated-removed:: 3.12 3.15
113113

114114
.. c:var:: int Py_DebugFlag
115115
@@ -123,7 +123,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
123123
Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment
124124
variable.
125125

126-
.. deprecated-removed:: 3.12 3.14
126+
.. deprecated-removed:: 3.12 3.15
127127

128128
.. c:var:: int Py_DontWriteBytecodeFlag
129129
@@ -137,7 +137,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
137137
Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE`
138138
environment variable.
139139

140-
.. deprecated-removed:: 3.12 3.14
140+
.. deprecated-removed:: 3.12 3.15
141141

142142
.. c:var:: int Py_FrozenFlag
143143
@@ -150,7 +150,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
150150

151151
Private flag used by ``_freeze_module`` and ``frozenmain`` programs.
152152

153-
.. deprecated-removed:: 3.12 3.14
153+
.. deprecated-removed:: 3.12 3.15
154154

155155
.. c:var:: int Py_HashRandomizationFlag
156156
@@ -165,7 +165,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
165165
If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment
166166
variable to initialize the secret hash seed.
167167

168-
.. deprecated-removed:: 3.12 3.14
168+
.. deprecated-removed:: 3.12 3.15
169169

170170
.. c:var:: int Py_IgnoreEnvironmentFlag
171171
@@ -178,7 +178,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
178178

179179
Set by the :option:`-E` and :option:`-I` options.
180180

181-
.. deprecated-removed:: 3.12 3.14
181+
.. deprecated-removed:: 3.12 3.15
182182

183183
.. c:var:: int Py_InspectFlag
184184
@@ -193,7 +193,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
193193
Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment
194194
variable.
195195

196-
.. deprecated-removed:: 3.12 3.14
196+
.. deprecated-removed:: 3.12 3.15
197197

198198
.. c:var:: int Py_InteractiveFlag
199199
@@ -218,7 +218,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
218218

219219
.. versionadded:: 3.4
220220

221-
.. deprecated-removed:: 3.12 3.14
221+
.. deprecated-removed:: 3.12 3.15
222222

223223
.. c:var:: int Py_LegacyWindowsFSEncodingFlag
224224
@@ -237,7 +237,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
237237

238238
.. availability:: Windows.
239239

240-
.. deprecated-removed:: 3.12 3.14
240+
.. deprecated-removed:: 3.12 3.15
241241

242242
.. c:var:: int Py_LegacyWindowsStdioFlag
243243
@@ -255,7 +255,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
255255

256256
.. availability:: Windows.
257257

258-
.. deprecated-removed:: 3.12 3.14
258+
.. deprecated-removed:: 3.12 3.15
259259

260260
.. c:var:: int Py_NoSiteFlag
261261
@@ -270,7 +270,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
270270

271271
Set by the :option:`-S` option.
272272

273-
.. deprecated-removed:: 3.12 3.14
273+
.. deprecated-removed:: 3.12 3.15
274274

275275
.. c:var:: int Py_NoUserSiteDirectory
276276
@@ -284,7 +284,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
284284
Set by the :option:`-s` and :option:`-I` options, and the
285285
:envvar:`PYTHONNOUSERSITE` environment variable.
286286

287-
.. deprecated-removed:: 3.12 3.14
287+
.. deprecated-removed:: 3.12 3.15
288288

289289
.. c:var:: int Py_OptimizeFlag
290290
@@ -295,7 +295,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
295295
Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment
296296
variable.
297297

298-
.. deprecated-removed:: 3.12 3.14
298+
.. deprecated-removed:: 3.12 3.15
299299

300300
.. c:var:: int Py_QuietFlag
301301
@@ -309,7 +309,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
309309

310310
.. versionadded:: 3.2
311311

312-
.. deprecated-removed:: 3.12 3.14
312+
.. deprecated-removed:: 3.12 3.15
313313

314314
.. c:var:: int Py_UnbufferedStdioFlag
315315
@@ -322,7 +322,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
322322
Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED`
323323
environment variable.
324324

325-
.. deprecated-removed:: 3.12 3.14
325+
.. deprecated-removed:: 3.12 3.15
326326

327327
.. c:var:: int Py_VerboseFlag
328328
@@ -338,7 +338,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
338338
Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment
339339
variable.
340340

341-
.. deprecated-removed:: 3.12 3.14
341+
.. deprecated-removed:: 3.12 3.15
342342

343343

344344
Initializing and finalizing the interpreter
@@ -606,7 +606,7 @@ Process-wide parameters
606606
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
607607
:c:expr:`wchar_*` string.
608608
609-
.. deprecated:: 3.11
609+
.. deprecated-removed:: 3.11 3.15
610610
611611
612612
.. c:function:: wchar_t* Py_GetProgramName()
@@ -868,7 +868,7 @@ Process-wide parameters
868868
.. XXX impl. doesn't seem consistent in allowing ``0``/``NULL`` for the params;
869869
check w/ Guido.
870870
871-
.. deprecated:: 3.11
871+
.. deprecated-removed:: 3.11 3.15
872872
873873
874874
.. c:function:: void PySys_SetArgv(int argc, wchar_t **argv)
@@ -889,7 +889,7 @@ Process-wide parameters
889889
890890
.. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`.
891891
892-
.. deprecated:: 3.11
892+
.. deprecated-removed:: 3.11 3.15
893893
894894
895895
.. c:function:: void Py_SetPythonHome(const wchar_t *home)
@@ -910,7 +910,7 @@ Process-wide parameters
910910
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
911911
:c:expr:`wchar_*` string.
912912
913-
.. deprecated:: 3.11
913+
.. deprecated-removed:: 3.11 3.15
914914
915915
916916
.. c:function:: wchar_t* Py_GetPythonHome()

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Pending removal in Python 3.15
55
* The :c:func:`PyImport_ImportModuleNoBlock`:
66
Use :c:func:`PyImport_ImportModule` instead.
77
* :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`:
8-
Use :c:func:`PyWeakref_GetRef` instead.
8+
Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project
9+
<https://github.com/python/pythoncapi-compat/>`__ can be used to get
10+
:c:func:`PyWeakref_GetRef` on Python 3.12 and older.
911
* :c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro:
1012
Use :c:type:`wchar_t` instead.
1113
* Python initialization functions:
@@ -23,9 +25,11 @@ Pending removal in Python 3.15
2325
* :c:func:`Py_GetProgramName`:
2426
Get :data:`sys.executable` instead.
2527
* :c:func:`Py_GetPythonHome`:
26-
Get :c:member:`PyConfig.home`
28+
Get :c:func:`PyConfig_Get("home") <PyConfig_Get>`
2729
or the :envvar:`PYTHONHOME` environment variable instead.
2830

31+
See also the :c:func:`PyConfig_Get` function.
32+
2933
* Functions to configure Python's initialization, deprecated in Python 3.11:
3034

3135
* :c:func:`!PySys_SetArgvEx()`:

0 commit comments

Comments
 (0)