--- work.orig/numba/_helperlib.c	2018-05-03 15:03:31.333872100 -0700
+++ work/numba/_helperlib.c	2018-05-03 15:08:30.197231800 -0700
@@ -805,10 +805,15 @@
         /* Reraise */
         PyThreadState *tstate = PyThreadState_GET();
         PyObject *tb;
+#if (PY_MAJOR_VERSION >= 3) && (PY_MINOR_VERSION >= 7)
+        _PyErr_StackItem *tstate_exc = tstate->exc_info;
+#else
+        PyThreadState *tstate_exc = tstate;
+#endif
         Py_DECREF(exc);
-        type = tstate->exc_type;
-        value = tstate->exc_value;
-        tb = tstate->exc_traceback;
+        type = tstate_exc->exc_type;
+        value = tstate_exc->exc_value;
+        tb = tstate_exc->exc_traceback;
         if (type == Py_None) {
             PyErr_SetString(PyExc_RuntimeError,
                             "No active exception to reraise");
