summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-08-16 10:03:05 (GMT)
committerGitHub <noreply@github.com>2023-08-16 10:03:05 (GMT)
commitaa9707dda9f8dcbe2ada8d8a7280f0f6a8229c59 (patch)
tree65b508c11793840d27e9f6b29c96496c740e75d5 /Lib/test/test_import
parentbd2ef82a5010985abdeef2ca71bcbcc9a366993b (diff)
downloadcpython-aa9707dda9f8dcbe2ada8d8a7280f0f6a8229c59.zip
cpython-aa9707dda9f8dcbe2ada8d8a7280f0f6a8229c59.tar.gz
cpython-aa9707dda9f8dcbe2ada8d8a7280f0f6a8229c59.tar.bz2
[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (#107751)
* Unrevert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) (#107599)". This reverts commit 6e4eec760648a71e1cd8f8f551997b1823b4bb9f (gh-107648). * Initialize each interpreter's refchain properly. * Skip test_basic_multiple_interpreters_deleted_no_reset on tracerefs builds.
Diffstat (limited to 'Lib/test/test_import')
-rw-r--r--Lib/test/test_import/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py
index 06adf01..f7df6d7 100644
--- a/Lib/test/test_import/__init__.py
+++ b/Lib/test/test_import/__init__.py
@@ -2539,6 +2539,12 @@ class SinglephaseInitTests(unittest.TestCase):
def test_basic_multiple_interpreters_deleted_no_reset(self):
# without resetting; already loaded in a deleted interpreter
+ if hasattr(sys, 'getobjects'):
+ # It's a Py_TRACE_REFS build.
+ # This test breaks interpreter isolation a little,
+ # which causes problems on Py_TRACE_REF builds.
+ raise unittest.SkipTest('crashes on Py_TRACE_REFS builds')
+
# At this point:
# * alive in 0 interpreters
# * module def may or may not be loaded already