[New-bugs-announce] [issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

Irit Katriel report at bugs.python.org
Tue Jan 11 07:43:40 EST 2022


New submission from Irit Katriel <iritkatriel at gmail.com>:

Following the removal of exc_type and exc_traceback from the interpreter's active exception in issue45711, we can now provide simplified get-set functions in the C Api:

PyAPI_FUNC(void) PyErr_GetActiveException(PyObject **);
PyAPI_FUNC(void) PyErr_SetActiveException(PyObject *);

as alternatives to 

PyAPI_FUNC(void) PyErr_GetExcInfo(PyObject **, PyObject **, PyObject **);
PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);

See also issue46328 re the corresponding change in the sys module.

----------
assignee: iritkatriel
components: C API, Interpreter Core
messages: 410299
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Add PyErr_GetActiveException and PyErr_SetActiveException
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46343>
_______________________________________


More information about the New-bugs-announce mailing list