summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-18 01:26:04 (GMT)
committerGitHub <noreply@github.com>2020-03-18 01:26:04 (GMT)
commit23ef89db7ae46d160650263cc80479c2ed6693fb (patch)
tree10113d5c3774882bf9f22ad91f863f07e907717f /Lib/test/test_capi.py
parentd7fabc116269e4650a684eb04f9ecd84421aa247 (diff)
downloadcpython-23ef89db7ae46d160650263cc80479c2ed6693fb.zip
cpython-23ef89db7ae46d160650263cc80479c2ed6693fb.tar.gz
cpython-23ef89db7ae46d160650263cc80479c2ed6693fb.tar.bz2
bpo-39984: _PyThreadState_DeleteCurrent() takes tstate (GH-19051)
* _PyThreadState_DeleteCurrent() now takes tstate rather than runtime. * Add ensure_tstate_not_null() helper to pystate.c. * Add _PyEval_ReleaseLock() function. * _PyThreadState_DeleteCurrent() now calls _PyEval_ReleaseLock(tstate) and frees PyThreadState memory after this call, not before. * PyGILState_Release(): rename "tcur" variable to "tstate".
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r--Lib/test/test_capi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 5a85c48..0243439 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -62,7 +62,8 @@ class CAPITest(unittest.TestCase):
# This used to cause an infinite loop.
self.assertTrue(err.rstrip().startswith(
b'Fatal Python error: '
- b'PyThreadState_Get: no current thread'))
+ b'PyThreadState_Get: '
+ b'current thread state is NULL (released GIL?)'))
def test_memoryview_from_NULL_pointer(self):
self.assertRaises(ValueError, _testcapi.make_memoryview_from_NULL_pointer)