Skip to content

Commit

Permalink
Python3.12: Fix, providing the context for runtime errors was disabled
Browse files Browse the repository at this point in the history
* These functions used work correctly now
  • Loading branch information
kayhayen committed May 15, 2024
1 parent dda9fa6 commit 1309584
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions nuitka/build/static_src/CompiledGeneratorType.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,11 @@ static void RAISE_RUNTIME_ERROR_RAISED_STOP_ITERATION(PyThreadState *tstate, cha
&new_exception_state.exception_tb);
#endif

#if PYTHON_VERSION < 0x3c0
Py_INCREF(saved_exception_state.exception_value);
RAISE_EXCEPTION_WITH_CAUSE_STATE(tstate, &new_exception_state, saved_exception_state.exception_value);

Py_INCREF(saved_exception_state.exception_value);
PyException_SetContext(new_exception_state.exception_value, saved_exception_state.exception_value);
#endif

RELEASE_ERROR_OCCURRED_STATE_X(&saved_exception_state);
RESTORE_ERROR_OCCURRED_STATE(tstate, &new_exception_state);
Expand Down

0 comments on commit 1309584

Please sign in to comment.