Message405968
greenlet now uses PyThreadState_EnterTracing() and PyThreadState_LeaveTracing() rather than accessing directly use_tracing:
https://github.com/python-greenlet/greenlet/commit/9b49da5c7e4808bd61b992e40f5b5243bfa9be6f
On Python 3.10, it implements these functions with:
---
// bpo-43760 added PyThreadState_EnterTracing() to Python 3.11.0a2
#if PY_VERSION_HEX < 0x030B00A2 && !defined(PYPY_VERSION)
static inline void PyThreadState_EnterTracing(PyThreadState *tstate)
{
tstate->tracing++;
#if PY_VERSION_HEX >= 0x030A00A1
tstate->cframe->use_tracing = 0;
#else
tstate->use_tracing = 0;
#endif
}
#endif
// bpo-43760 added PyThreadState_LeaveTracing() to Python 3.11.0a2
#if PY_VERSION_HEX < 0x030B00A2 && !defined(PYPY_VERSION)
static inline void PyThreadState_LeaveTracing(PyThreadState *tstate)
{
tstate->tracing--;
int use_tracing = (tstate->c_tracefunc != NULL
|| tstate->c_profilefunc != NULL);
#if PY_VERSION_HEX >= 0x030A00A1
tstate->cframe->use_tracing = use_tracing;
#else
tstate->use_tracing = use_tracing;
#endif
}
#endif
---
This code was copied from my https://github.com/pythoncapi/pythoncapi_compat project. (I wrote the greenlet change.) |
|
Date |
User |
Action |
Args |
2021-11-08 17:16:37 | vstinner | set | recipients:
+ vstinner, gvanrossum, rhettinger, jpe, scoder, petr.viktorin, lukasz.langa, Mark.Shannon, hroncok, pablogsal, miss-islington, erlendaasland, Xtrem532 |
2021-11-08 17:16:37 | vstinner | set | messageid: <1636391797.22.0.318696130262.issue43760@roundup.psfhosted.org> |
2021-11-08 17:16:37 | vstinner | link | issue43760 messages |
2021-11-08 17:16:37 | vstinner | create | |
|