bpo-36444: Remove _PyMainInterpreterConfig (GH-12571) · python/cpython@8b9dbc0 · GitHub
Skip to content

Commit 8b9dbc0

Browse files
authored
bpo-36444: Remove _PyMainInterpreterConfig (GH-12571)
1 parent 6a258c8 commit 8b9dbc0

10 files changed

Lines changed: 103 additions & 417 deletions

File tree

Include/cpython/pylifecycle.h

Lines changed: 1 addition & 10 deletions

Include/cpython/pystate.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,10 @@ extern "C" {
88

99
#include "cpython/coreconfig.h"
1010

11-
/* Placeholders while working on the new configuration API
12-
*
13-
* See PEP 432 for final anticipated contents
14-
*/
15-
typedef struct {
16-
int install_signal_handlers; /* Install signal handlers? -1 means unset */
17-
PyObject *argv; /* sys.argv list, can be NULL */
18-
PyObject *executable; /* sys.executable str */
19-
PyObject *prefix; /* sys.prefix str */
20-
PyObject *base_prefix; /* sys.base_prefix str, can be NULL */
21-
PyObject *exec_prefix; /* sys.exec_prefix str */
22-
PyObject *base_exec_prefix; /* sys.base_exec_prefix str, can be NULL */
23-
PyObject *warnoptions; /* sys.warnoptions list, can be NULL */
24-
PyObject *xoptions; /* sys._xoptions dict, can be NULL */
25-
PyObject *module_search_path; /* sys.path list */
26-
PyObject *pycache_prefix; /* sys.pycache_prefix str, can be NULL */
27-
} _PyMainInterpreterConfig;
28-
29-
#define _PyMainInterpreterConfig_INIT \
30-
(_PyMainInterpreterConfig){.install_signal_handlers = -1}
31-
/* Note: _PyMainInterpreterConfig_INIT sets other fields to 0/NULL */
32-
3311
PyAPI_FUNC(int) _PyInterpreterState_RequiresIDRef(PyInterpreterState *);
3412
PyAPI_FUNC(void) _PyInterpreterState_RequireIDRef(PyInterpreterState *, int);
3513

3614
PyAPI_FUNC(_PyCoreConfig *) _PyInterpreterState_GetCoreConfig(PyInterpreterState *);
37-
PyAPI_FUNC(_PyMainInterpreterConfig *) _PyInterpreterState_GetMainConfig(PyInterpreterState *);
3815

3916
PyAPI_FUNC(PyObject *) _PyInterpreterState_GetMainModule(PyInterpreterState *);
4017

Include/internal/pycore_coreconfig.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ PyAPI_FUNC(_PyInitError) _PyCoreConfig_Read(_PyCoreConfig *config,
104104
const _PyArgv *args);
105105
PyAPI_FUNC(void) _PyCoreConfig_Write(const _PyCoreConfig *config);
106106

107-
/* --- _PyMainInterpreterConfig ----------------------------------- */
108-
109-
PyAPI_FUNC(PyObject*) _PyMainInterpreterConfig_AsDict(
110-
const _PyMainInterpreterConfig *config);
111-
112107
#ifdef __cplusplus
113108
}
114109
#endif

Include/internal/pycore_pystate.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ struct _is {
5959
int fscodec_initialized;
6060

6161
_PyCoreConfig core_config;
62-
_PyMainInterpreterConfig config;
6362
#ifdef HAVE_DLOPEN
6463
int dlopenflags;
6564
#endif

Lib/test/test_embed.py

Lines changed: 0 additions & 29 deletions

0 commit comments

Comments
 (0)