Skip to content

Commit b20e204

Browse files
Merge pull request #159 from pauldmccarthy/mnt/pyerr-restore
MNT: Call `PyErr_Restore` to clear error state
2 parents 2118dad + 2282616 commit b20e204

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# `indexed_gzip` changelog
22

33

4+
## 1.9.2 (November 18th 2024)
5+
6+
7+
* Adjustment to exception handling (#158).
8+
9+
410
## 1.9.1 (November 15th 2024)
511

612

indexed_gzip/indexed_gzip.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ from cpython.buffer cimport (PyObject_GetBuffer,
3434
from cpython.ref cimport (PyObject,
3535
Py_XDECREF)
3636
from cpython.exc cimport (PyErr_Fetch,
37-
PyErr_Fetch,
37+
PyErr_Restore,
3838
PyErr_NormalizeException,
3939
PyErr_Occurred)
4040
from indexed_gzip.set_traceback cimport PyException_SetTraceback
@@ -102,6 +102,7 @@ cdef get_python_exception():
102102
exc = <object>pvalue
103103
if PY3 and (ptraceback != NULL):
104104
PyException_SetTraceback(pvalue, NULL)
105+
PyErr_Restore(NULL, NULL, NULL)
105106
Py_XDECREF(ptype)
106107
Py_XDECREF(pvalue)
107108
Py_XDECREF(ptraceback)

0 commit comments

Comments
 (0)