]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42260: Main init modify sys.flags in-place (GH-23150)
authorVictor Stinner <vstinner@python.org>
Wed, 4 Nov 2020 16:34:34 +0000 (17:34 +0100)
committerGitHub <noreply@github.com>
Wed, 4 Nov 2020 16:34:34 +0000 (17:34 +0100)
commitaf1d64d9f7a7cf673279725fdbaf4adcca51d41f
tree03baffe8b044cbbb2c73542bccddad0d9a97c82e
parent58ca33b4674f39189b03c9a39fa7b676b43b3d08
bpo-42260: Main init modify sys.flags in-place (GH-23150)

When Py_Initialize() is called twice, the second call now updates
more sys attributes for the configuration, rather than only sys.argv.

* Rename _PySys_InitMain() to _PySys_UpdateConfig().
* _PySys_UpdateConfig() now modifies sys.flags in-place, instead of
  creating a new flags object.
* Remove old commented sys.flags flags (unbuffered and skip_first).
* Add private _PySys_GetObject() function.
* When Py_Initialize(), Py_InitializeFromConfig() and
Include/internal/pycore_pylifecycle.h
Misc/NEWS.d/next/C API/2020-11-04-16-31-55.bpo-42260.CmgHtF.rst [new file with mode: 0644]
Python/pylifecycle.c
Python/sysmodule.c