]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-153300: Set global configuration variables in PyConfig_Set() (GH-153301...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 8 Jul 2026 18:21:20 +0000 (20:21 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2026 18:21:20 +0000 (20:21 +0200)
commitc5e73f8c91dd7a6aa7587b60e526b3e3a915bb3b
treed23b2ec0ef2b05e7640c3b569dbe2cfc99fa3c15
parent6af15c9b208975b53493ff4eb1eeebaaf3ac5878
[3.15] gh-153300: Set global configuration variables in PyConfig_Set() (GH-153301) (#153356)

gh-153300: Set global configuration variables in PyConfig_Set() (GH-153301)

PyConfig_Set() now also set global configuration variables. For
example, PyConfig_Set("inspect", value) now also sets Py_InspectFlag.

Use PyConfig_Set() in main.c to set the inspect flag. Python code can
now see the updated sys.flags.inspect value.
(cherry picked from commit 9fb713f1b8b774c789db007e3824c766a626ccff)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/test_capi/test_config.py
Misc/NEWS.d/next/C_API/2026-07-08-00-38-32.gh-issue-153300.lVoWyR.rst [new file with mode: 0644]
Modules/main.c
Python/initconfig.c