mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
gh-98608: Stop Treating All Errors from _Py_NewInterpreterFromConfig() as Fatal (gh-102657)
Prior to this change, errors in _Py_NewInterpreterFromConfig() were always fatal. Instead, callers should be able to handle such errors and keep going. That's what this change supports. (This was an oversight in the original implementation of _Py_NewInterpreterFromConfig().) Note that the existing [fatal] behavior of the public Py_NewInterpreter() is preserved. https://github.com/python/cpython/issues/98608
This commit is contained in:
parent
910a64e301
commit
3bb475662b
6 changed files with 27 additions and 17 deletions
|
|
@ -25,6 +25,7 @@ PyAPI_FUNC(PyStatus) PyStatus_Exit(int exitcode);
|
|||
PyAPI_FUNC(int) PyStatus_IsError(PyStatus err);
|
||||
PyAPI_FUNC(int) PyStatus_IsExit(PyStatus err);
|
||||
PyAPI_FUNC(int) PyStatus_Exception(PyStatus err);
|
||||
PyAPI_FUNC(PyObject *) _PyErr_SetFromPyStatus(PyStatus status);
|
||||
|
||||
/* --- PyWideStringList ------------------------------------------------ */
|
||||
|
||||
|
|
|
|||
|
|
@ -62,5 +62,6 @@ PyAPI_FUNC(int) _Py_CoerceLegacyLocale(int warn);
|
|||
PyAPI_FUNC(int) _Py_LegacyLocaleDetected(int warn);
|
||||
PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category);
|
||||
|
||||
PyAPI_FUNC(PyThreadState *) _Py_NewInterpreterFromConfig(
|
||||
const _PyInterpreterConfig *);
|
||||
PyAPI_FUNC(PyStatus) _Py_NewInterpreterFromConfig(
|
||||
PyThreadState **tstate_p,
|
||||
const _PyInterpreterConfig *config);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue