mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config * Always define WITH_THREAD for compatibility.
This commit is contained in:
parent
1f06a680de
commit
a6a4dc816d
135 changed files with 2472 additions and 4377 deletions
|
@ -11,6 +11,7 @@ import subprocess
|
|||
import sys
|
||||
import sysconfig
|
||||
import textwrap
|
||||
import threading
|
||||
import time
|
||||
import unittest
|
||||
from test import support
|
||||
|
@ -20,10 +21,7 @@ try:
|
|||
import _posixsubprocess
|
||||
except ImportError:
|
||||
_posixsubprocess = None
|
||||
try:
|
||||
import threading
|
||||
except ImportError:
|
||||
threading = None
|
||||
|
||||
# Skip this test if the _testcapi module isn't available.
|
||||
_testcapi = support.import_module('_testcapi')
|
||||
|
||||
|
@ -52,7 +50,6 @@ class CAPITest(unittest.TestCase):
|
|||
self.assertEqual(testfunction.attribute, "test")
|
||||
self.assertRaises(AttributeError, setattr, inst.testfunction, "attribute", "test")
|
||||
|
||||
@unittest.skipUnless(threading, 'Threading required for this test.')
|
||||
def test_no_FatalError_infinite_loop(self):
|
||||
with support.SuppressCrashReport():
|
||||
p = subprocess.Popen([sys.executable, "-c",
|
||||
|
@ -276,7 +273,6 @@ class CAPITest(unittest.TestCase):
|
|||
self.assertIn(b'MemoryError 3 30', out)
|
||||
|
||||
|
||||
@unittest.skipUnless(threading, 'Threading required for this test.')
|
||||
class TestPendingCalls(unittest.TestCase):
|
||||
|
||||
def pendingcalls_submit(self, l, n):
|
||||
|
@ -685,7 +681,6 @@ class SkipitemTest(unittest.TestCase):
|
|||
parse((1,), {}, 'O|OO', ['', 'a', ''])
|
||||
|
||||
|
||||
@unittest.skipUnless(threading, 'Threading required for this test.')
|
||||
class TestThreadState(unittest.TestCase):
|
||||
|
||||
@support.reap_threads
|
||||
|
@ -762,7 +757,6 @@ class PyMemDebugTests(unittest.TestCase):
|
|||
regex = regex.format(ptr=self.PTR_REGEX)
|
||||
self.assertRegex(out, regex)
|
||||
|
||||
@unittest.skipUnless(threading, 'Test requires a GIL (multithreading)')
|
||||
def check_malloc_without_gil(self, code):
|
||||
out = self.check(code)
|
||||
expected = ('Fatal Python error: Python memory allocator called '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue