From cd9536a0872046cc7c151b61b457975e7718274a Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 25 Apr 2025 14:43:38 -0600 Subject: gh-132781: Cleanup Code Related to NotShareableError (gh-132782) The following are added to the internal C-API: * _PyErr_FormatV() * _PyErr_SetModuleNotFoundError() * _PyXIData_GetNotShareableErrorType() * _PyXIData_FormatNotShareableError() We also drop _PyXIData_lookup_context_t and _PyXIData_GetLookupContext(). --- Include/internal/pycore_pyerrors.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Include/internal/pycore_pyerrors.h') diff --git a/Include/internal/pycore_pyerrors.h b/Include/internal/pycore_pyerrors.h index fa7d9ee36d0..f357b88e220 100644 --- a/Include/internal/pycore_pyerrors.h +++ b/Include/internal/pycore_pyerrors.h @@ -60,6 +60,7 @@ extern PyObject* _PyErr_SetImportErrorWithNameFrom( PyObject *, PyObject *, PyObject *); +extern int _PyErr_SetModuleNotFoundError(PyObject *name); /* runtime lifecycle */ @@ -113,6 +114,7 @@ extern void _PyErr_SetObject( PyObject *value); extern void _PyErr_ChainStackItem(void); +extern void _PyErr_ChainExceptions1Tstate(PyThreadState *, PyObject *); PyAPI_FUNC(void) _PyErr_Clear(PyThreadState *tstate); @@ -148,6 +150,12 @@ PyAPI_FUNC(PyObject*) _PyErr_Format( const char *format, ...); +PyAPI_FUNC(PyObject*) _PyErr_FormatV( + PyThreadState *tstate, + PyObject *exception, + const char *format, + va_list vargs); + extern void _PyErr_NormalizeException( PyThreadState *tstate, PyObject **exc, -- cgit v1.2.3