From f3e7eb48f86057919c347f56dabf417acfd55845 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 5 May 2023 15:59:20 -0600 Subject: gh-99113: Add PyInterpreterConfig.own_gil (gh-104204) We also add PyInterpreterState.ceval.own_gil to record if the interpreter actually has its own GIL. Note that for now we don't actually respect own_gil; all interpreters still share the one GIL. However, PyInterpreterState.ceval.own_gil does reflect PyInterpreterConfig.own_gil. That lie is a temporary one that we will fix when the GIL really becomes per-interpreter. --- Lib/test/test_embed.py | 1 + 1 file changed, 1 insertion(+) (limited to 'Lib/test/test_embed.py') diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index c9691bbf30..582392ecdd 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -1666,6 +1666,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): # All optional features should be enabled. 'feature_flags': OBMALLOC | FORK | EXEC | THREADS | DAEMON_THREADS, + 'own_gil': True, } out, err = self.run_embedded_interpreter( 'test_init_main_interpreter_settings', -- cgit v1.2.1