summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-31 11:53:19 (GMT)
committerGitHub <noreply@github.com>2023-08-31 11:53:19 (GMT)
commit79823c103b66030f10e07e04a5462f101674a4fc (patch)
tree9deb7f8c1c2cc2db31fa7613ea1e7844b4bb2768 /Lib/test/test_import
parent059bd4d299b384d2b434ccb106f91cb4bb03bbb1 (diff)
downloadcpython-79823c103b66030f10e07e04a5462f101674a4fc.zip
cpython-79823c103b66030f10e07e04a5462f101674a4fc.tar.gz
cpython-79823c103b66030f10e07e04a5462f101674a4fc.tar.bz2
gh-106320: Remove private _PyErr_ChainExceptions() (#108713)
Remove _PyErr_ChainExceptions(), _PyErr_ChainExceptions1() and _PyErr_SetFromPyStatus() functions from the public C API. * Move the private _PyErr_ChainExceptions() and _PyErr_ChainExceptions1() function to the internal C API (pycore_pyerrors.h). * Move the private _PyErr_SetFromPyStatus() to the internal C API (pycore_initconfig.h). * No longer export the _PyErr_ChainExceptions() function. * Move run_in_subinterp_with_config() from _testcapi to _testinternalcapi.
Diffstat (limited to 'Lib/test/test_import')
-rw-r--r--Lib/test/test_import/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py
index 051711b..740ce7d 100644
--- a/Lib/test/test_import/__init__.py
+++ b/Lib/test/test_import/__init__.py
@@ -1805,12 +1805,12 @@ class SubinterpImportTests(unittest.TestCase):
check_multi_interp_extensions=strict,
)
_, out, err = script_helper.assert_python_ok('-c', textwrap.dedent(f'''
- import _testcapi, sys
+ import _testinternalcapi, sys
assert (
{name!r} in sys.builtin_module_names or
{name!r} not in sys.modules
), repr({name!r})
- ret = _testcapi.run_in_subinterp_with_config(
+ ret = _testinternalcapi.run_in_subinterp_with_config(
{self.import_script(name, "sys.stdout.fileno()")!r},
**{kwargs},
)
@@ -1829,9 +1829,9 @@ class SubinterpImportTests(unittest.TestCase):
check_multi_interp_extensions=True,
)
_, out, err = script_helper.assert_python_ok('-c', textwrap.dedent(f'''
- import _testcapi, sys
+ import _testinternalcapi, sys
assert {name!r} not in sys.modules, {name!r}
- ret = _testcapi.run_in_subinterp_with_config(
+ ret = _testinternalcapi.run_in_subinterp_with_config(
{self.import_script(name, "sys.stdout.fileno()")!r},
**{kwargs},
)