Skip to content

Commit

Permalink
fix instrumentation for Python 3.7 and 3.8 (regression when introduci…
Browse files Browse the repository at this point in the history
…ng 3.11)
  • Loading branch information
dfeneyrou committed Sep 18, 2024
1 parent 6d5e637 commit 81029df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions c++/palanteer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1425,8 +1425,8 @@ class plCliIo {
#if USE_PL==1 || PL_EXPORT==1

// Library version
#define PALANTEER_VERSION "0.7"
#define PALANTEER_VERSION_NUM 700 // Monotonic number. 100 per version component. Official releases are multiple of 100
#define PALANTEER_VERSION "0.7.1"
#define PALANTEER_VERSION_NUM 701 // Monotonic number. 100 per version component. Official releases are multiple of 100

// Client-Server protocol version
#define PALANTEER_CLIENT_PROTOCOL_VERSION 3
Expand Down
6 changes: 5 additions & 1 deletion python/palanteer/_cextension/pyPalanteerInstrumentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,11 @@ traceCallback(PyObject* Py_UNUSED(self), PyFrameObject* frame, int what, PyObjec
}

// Store upper level so that we skip it
ctc.nextExceptionFrame = PyFrame_GetBack(frame);
#if PY_VERSION_HEX >= 0x03090000
ctc.nextExceptionFrame = PyFrame_GetBack(frame); // Python 3.9 and above
#else
ctc.nextExceptionFrame = frame->f_back;
#endif
gOsThread.isBootstrap = 0;

// Restore the error state
Expand Down

0 comments on commit 81029df

Please sign in to comment.