Skip to content

Commit 052e61b

Browse files
committed
[mypyc] Don't use _PyErr_ChainExceptions on 3.12, since it's deprecated
See python/cpython#102935.
1 parent 719e7e7 commit 052e61b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mypyc/lib-rt/exc_ops.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ void CPy_AddTraceback(const char *filename, const char *funcname, int line, PyOb
230230
return;
231231

232232
error:
233+
#if CPY_3_12_FEATURES
234+
_PyErr_ChainExceptions1(exc);
235+
#else
233236
_PyErr_ChainExceptions(exc, val, tb);
237+
#endif
234238
}
235239

236240
CPy_NOINLINE

0 commit comments

Comments
 (0)