From: Victor Stinner Date: Sat, 16 Mar 2024 20:37:11 +0000 (+0100) Subject: gh-116809: Restore removed _PyErr_ChainExceptions1() function (#116900) X-Git-Tag: v3.13.0a6~279 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e0a070dfe33530756fa2811b76bf959b9616590;p=thirdparty%2FPython%2Fcpython.git gh-116809: Restore removed _PyErr_ChainExceptions1() function (#116900) --- diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h index 32c5884cd213..42b4b03b10ca 100644 --- a/Include/cpython/pyerrors.h +++ b/Include/cpython/pyerrors.h @@ -88,6 +88,10 @@ typedef PyOSErrorObject PyEnvironmentErrorObject; typedef PyOSErrorObject PyWindowsErrorObject; #endif +/* Context manipulation (PEP 3134) */ + +PyAPI_FUNC(void) _PyErr_ChainExceptions1(PyObject *); + /* In exceptions.c */ PyAPI_FUNC(PyObject*) PyUnstable_Exc_PrepReraiseStar( diff --git a/Include/internal/pycore_pyerrors.h b/Include/internal/pycore_pyerrors.h index 910335fd2cf3..683d87a0d0b1 100644 --- a/Include/internal/pycore_pyerrors.h +++ b/Include/internal/pycore_pyerrors.h @@ -167,9 +167,6 @@ void _PyErr_FormatNote(const char *format, ...); Py_DEPRECATED(3.12) extern void _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *); -// Export for '_zoneinfo' shared extension -PyAPI_FUNC(void) _PyErr_ChainExceptions1(PyObject *); - #ifdef __cplusplus } #endif diff --git a/Misc/NEWS.d/next/C API/2024-03-16-12-21-00.gh-issue-116809.JL786L.rst b/Misc/NEWS.d/next/C API/2024-03-16-12-21-00.gh-issue-116809.JL786L.rst new file mode 100644 index 000000000000..a122e1b45b95 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2024-03-16-12-21-00.gh-issue-116809.JL786L.rst @@ -0,0 +1,2 @@ +Restore removed private ``_PyErr_ChainExceptions1()`` function. Patch by +Victor Stinner.