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 wenzel
Recipients gregory.p.smith, larry, njs, python-dev, vstinner, wenzel
Date 2016-04-25.15:16:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461597397.24.0.767932061156.issue26154@psf.upfronthosting.co.za>
In-reply-to
Content
I've also run into this regression. FWIW this is what I've ended up using to work around it (it's a mess, but what are we to do..)

#if PY_VERSION_HEX >= 0x03050000 && PY_VERSION_HEX < 0x03050200
extern "C" {
    /* Manually import _PyThreadState_Current symbol */
    struct _Py_atomic_address { void *value; };
    PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current;
};
#endif

PyThreadState *get_thread_state_unchecked() {
#if   PY_VERSION_HEX < 0x03000000
    return _PyThreadState_Current;
#elif PY_VERSION_HEX < 0x03050000
    return (PyThreadState*) _Py_atomic_load_relaxed(&_PyThreadState_Current);
#elif PY_VERSION_HEX < 0x03050200
    return (PyThreadState*) _PyThreadState_Current.value;
#else
    return _PyThreadState_UncheckedGet();
#endif
}
History
Date User Action Args
2016-04-25 15:16:37wenzelsetrecipients: + wenzel, gregory.p.smith, vstinner, larry, njs, python-dev
2016-04-25 15:16:37wenzelsetmessageid: <1461597397.24.0.767932061156.issue26154@psf.upfronthosting.co.za>
2016-04-25 15:16:37wenzellinkissue26154 messages
2016-04-25 15:16:37wenzelcreate