Skip to content

Commit fed9fc3

Browse files
authored
Skip recursive type alias test on Windows ARM64 with Python 3.12 (#1210)
Since 26 September, the Windows ARM64 wheel job has run on the Visual Studio 2026 image of the `windows-11-arm` label (actions/runner-images#14602) and has failed every time. On Python 3.12, `test_recursive_typealias_errors` overflows the C stack before `RecursionError` is raised, and the job ends before the 3.13 and later wheels are built and tested. On Windows, Python 3.12 has a C recursion limit of 3000 with a 2 MB stack in `python.exe`. In CPython 3.13 the limit was lowered to 1000 on Windows ARM64 after a stack overflow on the CPython ARM64 Windows buildbot (python/cpython#117008); 3.12 still uses 3000. In the same jobs, the other tests that reach the recursion limit on 3.12 passed wherever they ran. The 3.13 and later wheels have not been built or tested on the new image yet, and part of the 3.12 suite has not run there either, so the CI run of this PR is the first check for them. With this change the test is skipped on Windows ARM64 with Python 3.12, like the existing `emscripten_stack_limited` skip for Pyodide. In that combination, analyzing a recursive type alias (which msgspec does not support) can still end in a stack overflow instead of a `RecursionError`. Co-authored-by: Tseluiko Aleksandr <[email protected]>
1 parent e7552f0 commit fed9fc3

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎tests/unit/test_common.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
max_call_depth,
3939
py315_or_later_only,
4040
temp_module,
41+
win_arm64_py312_stack_limited,
4142
)
4243

4344
try:
@@ -4746,6 +4747,7 @@ def test_typealias_parametrized_generic_too_many_parameters(self):
47464747
],
47474748
)
47484749
@emscripten_stack_limited
4750+
@win_arm64_py312_stack_limited
47494751
def test_recursive_typealias_errors(self, src):
47504752
"""Eventually we should support this, but for now just test that it
47514753
errors cleanly"""

‎tests/unit/utils.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import inspect
22
import sys
3+
import sysconfig
34
import textwrap
45
import types
56
import uuid
@@ -12,6 +13,13 @@
1213
reason="Pyodide can overflow the JS/Wasm stack before raising RecursionError",
1314
)
1415

16+
# The C recursion limit on Windows ARM64 was lowered from 3000 to 1000 in
17+
# CPython 3.13 (python/cpython#117008); 3.12 still uses 3000.
18+
win_arm64_py312_stack_limited = pytest.mark.skipif(
19+
sysconfig.get_platform() == "win-arm64" and sys.version_info[:2] == (3, 12),
20+
reason="Python 3.12 on Windows ARM64 can overflow the C stack before raising RecursionError",
21+
)
22+
1523
py315_or_later_only = pytest.mark.skipif(
1624
sys.version_info < (3, 15), reason="frozendict was added in 3.15"
1725
)

0 commit comments

Comments
 (0)