Skip to content

Commit a861fe5

Browse files
committed
tests: skip recursion limit tests on macOS with python 3.14
Starting with python 3.14.0a6, recursion limit tests on macOS seem to crash python interpreter, likely due to a problem in the new stack limit detection code. For now, skip these tests. See python/cpython#131543 Also remove earlier `xfail` mark for Windows, because the crash mentioned in its reasons does not seem to occur anymore.
1 parent eaa1ac7 commit a861fe5

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎tests/unit/test_recursion_limit.py‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@
1414
from PyInstaller.lib.modulegraph import modulegraph
1515
from PyInstaller import configure
1616
from PyInstaller import __main__ as pyi_main
17-
from PyInstaller.compat import is_win
17+
from PyInstaller import compat
18+
19+
# Recursion limit tests crash python interpreter with macOS builds of python >= 3.14.0a6.
20+
# See: https://github.com/python/cpython/issues/131543
21+
# Only "standard" python interpreter is affected; the free-threading variant seems to work as expected.
22+
pytestmark = pytest.mark.skipif(
23+
compat.is_py314 and compat.is_darwin and not compat.is_nogil,
24+
reason="Deep recursion crashes python interpreter.",
25+
)
1826

1927

2028
@pytest.fixture
@@ -55,8 +63,6 @@ def test_recursion_too_deep(large_import_chain):
5563
With the default recursion limit (1000), the recursion error occurs at about 115 modules, with limit 2000
5664
(as tested below) at about 240 modules, and with limit 5000 at about 660 modules.
5765
"""
58-
if is_win:
59-
pytest.xfail("Worker is known to crash on Windows.")
6066
path, script = large_import_chain
6167
mg = modulegraph.ModuleGraph(path)
6268
# Increase recursion limit to 5 times of the default. Given the module import chain created above
@@ -70,8 +76,6 @@ def test_RecursionError_prints_message(tmp_path, large_import_chain, monkeypatch
7076
modulegraph is recursive and triggers RecursionError if nesting of imported modules is too deep.
7177
Ensure an informative message is printed if RecursionError occurs.
7278
"""
73-
if is_win:
74-
pytest.xfail("Worker is known to crash on Windows.")
7579
path, script = large_import_chain
7680

7781
default_args = [

0 commit comments

Comments
 (0)