[3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) by vstinner · Pull Request #20618 · python/cpython

added 2 commits

June 3, 2020 18:33
Add _Py_EnsureTstateNotNULL(tstate) macro: call Py_FatalError() if
tstate is NULL, the error message contains the current function name.

(cherry picked from commit 3026cad)
PyOS_InterruptOccurred() now fails with a fatal error if it is called
with the GIL released.

(cherry picked from commit cbe1296)

@pv pv mentioned this pull request

Jun 19, 2020