]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-153300: Set global configuration variables in PyConfig_Set() (#153301)
authorVictor Stinner <vstinner@python.org>
Wed, 8 Jul 2026 16:56:07 +0000 (18:56 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2026 16:56:07 +0000 (16:56 +0000)
commit9fb713f1b8b774c789db007e3824c766a626ccff
tree5422560ec51fa4347e1f4260bcdc6ddd0f517486
parentc9687b484102ca6dbc3489fe1e5773e0cefa8f51
gh-153300: Set global configuration variables in PyConfig_Set() (#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.
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