mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
gh-129033: Remove _PyInterpreterState_SetConfig() function (#129048)
Remove _PyInterpreterState_GetConfigCopy() and _PyInterpreterState_SetConfig() private functions. PEP 741 "Python Configuration C API" added a better public C API: PyConfig_Get() and PyConfig_Set().
This commit is contained in:
parent
573c181502
commit
8ceb6cb117
11 changed files with 22 additions and 500 deletions
|
|
@ -1746,14 +1746,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
self.check_all_configs("test_init_warnoptions", config, preconfig,
|
||||
api=API_PYTHON)
|
||||
|
||||
def test_init_set_config(self):
|
||||
config = {
|
||||
'bytes_warning': 2,
|
||||
'warnoptions': ['error::BytesWarning'],
|
||||
}
|
||||
self.check_all_configs("test_init_set_config", config,
|
||||
api=API_ISOLATED)
|
||||
|
||||
@unittest.skipIf(support.check_bolt_optimized, "segfaults on BOLT instrumented binaries")
|
||||
def test_initconfig_api(self):
|
||||
preconfig = {
|
||||
|
|
@ -1845,22 +1837,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
self.assertEqual(err, "")
|
||||
|
||||
|
||||
class SetConfigTests(unittest.TestCase):
|
||||
def test_set_config(self):
|
||||
# bpo-42260: Test _PyInterpreterState_SetConfig()
|
||||
import_helper.import_module('_testcapi')
|
||||
cmd = [sys.executable, '-X', 'utf8', '-I', '-m', 'test._test_embed_set_config']
|
||||
proc = subprocess.run(cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
encoding='utf-8', errors='backslashreplace')
|
||||
if proc.returncode and support.verbose:
|
||||
print(proc.stdout)
|
||||
print(proc.stderr)
|
||||
self.assertEqual(proc.returncode, 0,
|
||||
(proc.returncode, proc.stdout, proc.stderr))
|
||||
|
||||
|
||||
class AuditingTests(EmbeddingTestsMixin, unittest.TestCase):
|
||||
def test_open_code_hook(self):
|
||||
self.run_embedded_interpreter("test_open_code_hook")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue