diff options
author | Victor Stinner <vstinner@python.org> | 2021-06-23 12:13:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 12:13:27 (GMT) |
commit | 489699ca05bed5cfd10e847d8580840812b476cd (patch) | |
tree | f58b7493648a430be755b5bc5a788923c8774e62 /Doc/c-api/init_config.rst | |
parent | 019ad62afd20e80c74f879aa716e339b992a0bb9 (diff) | |
download | cpython-489699ca05bed5cfd10e847d8580840812b476cd.zip cpython-489699ca05bed5cfd10e847d8580840812b476cd.tar.gz cpython-489699ca05bed5cfd10e847d8580840812b476cd.tar.bz2 |
bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874)
Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.
Diffstat (limited to 'Doc/c-api/init_config.rst')
-rw-r--r-- | Doc/c-api/init_config.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst index de85029..fe5b83a 100644 --- a/Doc/c-api/init_config.rst +++ b/Doc/c-api/init_config.rst @@ -1193,7 +1193,10 @@ The caller is responsible to handle exceptions (error or exit) using If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:func:`PyImport_ExtendInittab` are used, they must be set or called after -Python preinitialization and before the Python initialization. +Python preinitialization and before the Python initialization. If Python is +initialized multiple times, :c:func:`PyImport_AppendInittab` or +:c:func:`PyImport_ExtendInittab` must be called before each Python +initialization. The current configuration (``PyConfig`` type) is stored in ``PyInterpreterState.config``. |