palanteer icon indicating copy to clipboard operation
palanteer copied to clipboard

palanteer\_cextension\pyPalanteerInstrumentation.cpp(180): error C2039: 'frame': is not a member of '_ts'

Open cod3monk3y opened this issue 8 months ago • 0 comments

Palanteer wheels do not build with Python 3.11 and above. The frame member was removed from the Python C API in 3.11.

Tried:

pip install palanteer

and:

pip install palanteer@git+https://github.com/dfeneyrou/palanteer#subdirectory=python

Result (truncated)

     palanteer\_cextension\pyPalanteerInstrumentation.cpp(180): error C2039: 'frame': is not a member of '_ts'
      C:\Program Files\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'

See pystate.h on cpython github:

Version 3.11: https://github.com/python/cpython/blob/3.11/Include/cpython/pystate.h

struct _ts {
    /* See Python/ceval.c for comments explaining most fields */

    PyThreadState *prev;
    PyThreadState *next;
    PyInterpreterState *interp;

    /* Has been initialized to a safe state.

       In order to be effective, this must be set to 0 during or right
       after allocation. */
    int _initialized;

    /* Was this thread state statically allocated? */
    int _static;

    int recursion_remaining;
    int recursion_limit;
    int recursion_headroom; /* Allow 50 more calls to handle any errors. */

And version 3.10: https://github.com/python/cpython/blob/3.10/Include/cpython/pystate.h

struct _ts {
    /* See Python/ceval.c for comments explaining most fields */

    struct _ts *prev;
    struct _ts *next;
    PyInterpreterState *interp;

    /* Borrowed reference to the current frame (it can be NULL) */
    PyFrameObject *frame;
    int recursion_depth;
    int recursion_headroom; /* Allow 50 more calls to handle any errors. */
    int stackcheck_counter;

cod3monk3y avatar Jun 03 '24 19:06 cod3monk3y