mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-40453: Add PyConfig._isolated_subinterpreter (GH-19820)
An isolated subinterpreter cannot spawn threads, spawn a child process or call os.fork(). * Add private _Py_NewInterpreter(isolated_subinterpreter) function. * Add isolated=True keyword-only parameter to _xxsubinterpreters.create(). * Allow again os.fork() in "non-isolated" subinterpreters.
This commit is contained in:
parent
8bcfd31cc0
commit
252346acd9
14 changed files with 68 additions and 12 deletions
|
@ -406,6 +406,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
'check_hash_pycs_mode': 'default',
|
||||
'pathconfig_warnings': 1,
|
||||
'_init_main': 1,
|
||||
'_isolated_interpreter': 0,
|
||||
}
|
||||
if MS_WINDOWS:
|
||||
CONFIG_COMPAT.update({
|
||||
|
@ -766,6 +767,8 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
|
||||
'check_hash_pycs_mode': 'always',
|
||||
'pathconfig_warnings': 0,
|
||||
|
||||
'_isolated_interpreter': 1,
|
||||
}
|
||||
self.check_all_configs("test_init_from_config", config, preconfig,
|
||||
api=API_COMPAT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue