Skip to content

Commit

Permalink
Revert: Do not allow exceptions in Cursor destructor (#585)
Browse files Browse the repository at this point in the history
We need to report errors in destructors, apparently.  Otherwise all tests fail and we get a
segfault!  I need to look into this more.
  • Loading branch information
mkleehammer committed Apr 11, 2023
1 parent 5ab74b3 commit b7b4e90
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,6 @@ static void Cursor_dealloc(Cursor* cursor)
if (Cursor_Validate((PyObject*)cursor, CURSOR_REQUIRE_CNXN))
{
closeimpl(cursor);
if (PyErr_Occurred()) {
// We are in a Cursor destructor (__del__) and should not raise exceptions.
PyErr_Clear();
}
}
Py_XDECREF(cursor->inputsizes);
PyObject_Del(cursor);
Expand Down

0 comments on commit b7b4e90

Please sign in to comment.