]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-107954, PEP 741: Add PyConfig_Get()/Set() functions (#123472)
authorVictor Stinner <vstinner@python.org>
Mon, 2 Sep 2024 21:25:08 +0000 (23:25 +0200)
committerGitHub <noreply@github.com>
Mon, 2 Sep 2024 21:25:08 +0000 (23:25 +0200)
commit33b790978d8b817a66a4a117a8c38a857b6103f0
treeea11817b7267715e2b19e944e42233c7a4a28399
parentdb42934270c5c23be9f6804cad98dfd8234caf6f
  gh-107954, PEP 741: Add PyConfig_Get()/Set() functions (#123472)

Add PyConfig_Get(), PyConfig_GetInt(), PyConfig_Set() and
PyConfig_Names() functions to get and set the current runtime Python
configuration.

Add visibility and "sys spec" to config and preconfig specifications.

_PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
19 files changed:
Doc/c-api/init_config.rst
Doc/whatsnew/3.14.rst
Include/cpython/initconfig.h
Include/internal/pycore_initconfig.h
Include/internal/pycore_sysmodule.h
Lib/test/_test_embed_set_config.py
Lib/test/test_capi/test_config.py [new file with mode: 0644]
Lib/test/test_embed.py
Misc/NEWS.d/next/C_API/2024-08-29-15-55-55.gh-issue-107954.pr2O50.rst [new file with mode: 0644]
Modules/Setup.stdlib.in
Modules/_testcapi/config.c [new file with mode: 0644]
Modules/_testcapi/parts.h
Modules/_testcapimodule.c
PCbuild/_testcapi.vcxproj
PCbuild/_testcapi.vcxproj.filters
Python/initconfig.c
Python/sysmodule.c
Tools/c-analyzer/cpython/_parser.py
Tools/c-analyzer/cpython/ignored.tsv