This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fabioz
Recipients fabioz, vstinner
Date 2019-10-16.16:17:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571242626.68.0.14615334114.issue38500@roundup.psfhosted.org>
In-reply-to
Content
In CPython 3.7 it was possible to do:

#include "pystate.h"
...
PyThreadState *ts = PyThreadState_Get();
PyInterpreterState *interp = ts->interp;
interp->eval_frame = my_frame_eval_func;

This is no longer possible because in 3.8 the PyInterpreterState is opaque, so, Py_BUILD_CORE_MODULE needs to be defined defined and "internal/pycore_pystate.h" must be included to set PyInterpreterState.eval_frame.

This works but isn't ideal -- maybe there could be a function to set PyInterpreterState.eval_frame?
History
Date User Action Args
2019-10-16 16:17:06fabiozsetrecipients: + fabioz, vstinner
2019-10-16 16:17:06fabiozsetmessageid: <1571242626.68.0.14615334114.issue38500@roundup.psfhosted.org>
2019-10-16 16:17:06fabiozlinkissue38500 messages
2019-10-16 16:17:06fabiozcreate