]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-153300: Set global configuration variables in PyConfig_Set() (#153301)...
authorVictor Stinner <vstinner@python.org>
Wed, 8 Jul 2026 18:20:45 +0000 (20:20 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2026 18:20:45 +0000 (20:20 +0200)
commit6241d0d46bbf36d2c456e74e24d78076a743ca7d
tree1977ba808e0ffecf33b64a1dcbaffa8cbe235f5d
parent762eb2e7688efef0bb8cfff29dc1e2f86558be85
[3.14] gh-153300: Set global configuration variables in PyConfig_Set() (#153301) (#153359)

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.

(cherry picked from commit 9fb713f1b8b774c789db007e3824c766a626ccff)
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