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>
This commit is contained in:
Victor Stinner 2024-09-02 23:25:08 +02:00 committed by GitHub
parent db42934270
commit 33b790978d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 1468 additions and 259 deletions

View file

@ -29,6 +29,9 @@ extern int _PySys_SetAttr(PyObject *, PyObject *);
extern int _PySys_ClearAttrString(PyInterpreterState *interp,
const char *name, int verbose);
extern int _PySys_SetFlagObj(Py_ssize_t pos, PyObject *new_value);
extern int _PySys_SetIntMaxStrDigits(int maxdigits);
#ifdef __cplusplus
}
#endif