Skip to content

Commit 1831eb3

Browse files
committed
Skip test for WASI
1 parent 02cdf2f commit 1831eb3

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Include/cpython/pystate.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,7 @@ struct _ts {
193193
#ifdef Py_DEBUG
194194
// A debug build is likely built with low optimization level which implies
195195
// higher stack memory usage than a release build: use a lower limit.
196-
# if defined(__wasi__)
197-
// Based on wasmtime 16.
198-
# define Py_C_RECURSION_LIMIT 300
199-
# else
200-
# define Py_C_RECURSION_LIMIT 500
201-
# endif
196+
# define Py_C_RECURSION_LIMIT 500
202197
#elif defined(__s390x__)
203198
# define Py_C_RECURSION_LIMIT 800
204199
#elif defined(_WIN32) && defined(_M_ARM64)

Lib/test/test_dynamic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
import unittest
66

7-
from test.support import swap_item, swap_attr
7+
from test.support import swap_item, swap_attr, is_wasi
88

99

1010
class RebindBuiltinsTests(unittest.TestCase):
@@ -134,14 +134,15 @@ def test_eval_gives_lambda_custom_globals(self):
134134

135135
self.assertEqual(foo(), 7)
136136

137+
@unittest.skipIf(is_wasi and Py_DEBUG, "requires too much stack")
137138
def test_load_global_specialization_failure_keeps_oparg(self):
138139
# https://github.com/python/cpython/issues/91625
139140
class MyGlobals(dict):
140141
def __missing__(self, key):
141142
return int(key.removeprefix("_number_"))
142143

143144
# Need more than 256 variables to use EXTENDED_ARGS
144-
variables = 270
145+
variables = 400
145146
code = "lambda: " + "+".join(f"_number_{i}" for i in range(variables))
146147
sum_func = eval(code, MyGlobals())
147148
expected = sum(range(variables))

0 commit comments

Comments
 (0)