Complete doc of pending C API removals in Python 3.15 (#129032)

This commit is contained in:
Victor Stinner 2025-01-19 22:47:05 +01:00 committed by GitHub
parent d57b2d83dd
commit bbeb219354
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 22 deletions

View file

@ -5,7 +5,9 @@ Pending removal in Python 3.15
* The :c:func:`PyImport_ImportModuleNoBlock`:
Use :c:func:`PyImport_ImportModule` instead.
* :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`:
Use :c:func:`PyWeakref_GetRef` instead.
Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project
<https://github.com/python/pythoncapi-compat/>`__ can be used to get
:c:func:`PyWeakref_GetRef` on Python 3.12 and older.
* :c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro:
Use :c:type:`wchar_t` instead.
* Python initialization functions:
@ -23,9 +25,11 @@ Pending removal in Python 3.15
* :c:func:`Py_GetProgramName`:
Get :data:`sys.executable` instead.
* :c:func:`Py_GetPythonHome`:
Get :c:member:`PyConfig.home`
Get :c:func:`PyConfig_Get("home") <PyConfig_Get>`
or the :envvar:`PYTHONHOME` environment variable instead.
See also the :c:func:`PyConfig_Get` function.
* Functions to configure Python's initialization, deprecated in Python 3.11:
* :c:func:`!PySys_SetArgvEx()`: