diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2021-12-17 14:46:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 14:46:22 +0000 |
commit | 396b58345f81d4c8c5a52546d2288e666a1b9b8b (patch) | |
tree | 89140d0930da874df676cfac27d2e85e746a5fc1 /Objects | |
parent | 62a0a2a25dbe3ba6f2973a37a3022d982fdc163c (diff) | |
download | cpython-git-396b58345f81d4c8c5a52546d2288e666a1b9b8b.tar.gz |
bpo-45711: Remove type and traceback from exc_info (GH-30122)
* Do not PUSH/POP traceback or type to the stack as part of exc_info
* Remove exc_traceback and exc_type from _PyErr_StackItem
* Add to what's new, because this change breaks things like Cython
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/genobject.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index 24a4e94bfc..d093f3dd7d 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -25,9 +25,7 @@ static const char *ASYNC_GEN_IGNORED_EXIT_MSG = static inline int exc_state_traverse(_PyErr_StackItem *exc_state, visitproc visit, void *arg) { - Py_VISIT(exc_state->exc_type); Py_VISIT(exc_state->exc_value); - Py_VISIT(exc_state->exc_traceback); return 0; } @@ -886,9 +884,7 @@ make_gen(PyTypeObject *type, PyFunctionObject *func) gen->gi_code = (PyCodeObject *)func->func_code; Py_INCREF(gen->gi_code); gen->gi_weakreflist = NULL; - gen->gi_exc_state.exc_type = NULL; gen->gi_exc_state.exc_value = NULL; - gen->gi_exc_state.exc_traceback = NULL; gen->gi_exc_state.previous_item = NULL; if (func->func_name != NULL) gen->gi_name = func->func_name; @@ -975,9 +971,7 @@ gen_new_with_qualname(PyTypeObject *type, PyFrameObject *f, Py_INCREF(gen->gi_code); Py_DECREF(f); gen->gi_weakreflist = NULL; - gen->gi_exc_state.exc_type = NULL; gen->gi_exc_state.exc_value = NULL; - gen->gi_exc_state.exc_traceback = NULL; gen->gi_exc_state.previous_item = NULL; if (name != NULL) gen->gi_name = name; |