bpo-40826: PyOS_InterruptOccurred() requires GIL by vstinner · Pull Request #20578 · python/cpython

@vstinner

PyOS_InterruptOccurred() now fails with a fatal error if it is called
with the GIL released.

vstinner added a commit that referenced this pull request

Jun 3, 2020
…-20618)

* bpo-40826: Add _Py_EnsureTstateNotNULL() macro (GH-20571)

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)

* bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578)

PyOS_InterruptOccurred() now fails with a fatal error if it is called
with the GIL released.

(cherry picked from commit cbe1296)