Set by the :option:`-b` option.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_DebugFlag
Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment
variable.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_DontWriteBytecodeFlag
Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE`
environment variable.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_FrozenFlag
Private flag used by ``_freeze_module`` and ``frozenmain`` programs.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_HashRandomizationFlag
If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment
variable to initialize the secret hash seed.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_IgnoreEnvironmentFlag
Set by the :option:`-E` and :option:`-I` options.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_InspectFlag
Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment
variable.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_InteractiveFlag
.. versionadded:: 3.4
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_LegacyWindowsFSEncodingFlag
.. availability:: Windows.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_LegacyWindowsStdioFlag
.. availability:: Windows.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_NoSiteFlag
Set by the :option:`-S` option.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_NoUserSiteDirectory
Set by the :option:`-s` and :option:`-I` options, and the
:envvar:`PYTHONNOUSERSITE` environment variable.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_OptimizeFlag
Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment
variable.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_QuietFlag
.. versionadded:: 3.2
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_UnbufferedStdioFlag
Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED`
environment variable.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
.. c:var:: int Py_VerboseFlag
Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment
variable.
- .. deprecated-removed:: 3.12 3.14
+ .. deprecated-removed:: 3.12 3.15
Initializing and finalizing the interpreter
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
:c:expr:`wchar_*` string.
- .. deprecated:: 3.11
+ .. deprecated-removed:: 3.11 3.15
.. c:function:: wchar_t* Py_GetProgramName()
.. XXX impl. doesn't seem consistent in allowing ``0``/``NULL`` for the params;
check w/ Guido.
- .. deprecated:: 3.11
+ .. deprecated-removed:: 3.11 3.15
.. c:function:: void PySys_SetArgv(int argc, wchar_t **argv)
.. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`.
- .. deprecated:: 3.11
+ .. deprecated-removed:: 3.11 3.15
.. c:function:: void Py_SetPythonHome(const wchar_t *home)
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
:c:expr:`wchar_*` string.
- .. deprecated:: 3.11
+ .. deprecated-removed:: 3.11 3.15
.. c:function:: wchar_t* Py_GetPythonHome()
* 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:
* :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()`: