File tree 2 files changed +4
-8
lines changed 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -193,12 +193,7 @@ struct _ts {
193
193
#ifdef Py_DEBUG
194
194
// A debug build is likely built with low optimization level which implies
195
195
// 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
202
197
#elif defined(__s390x__ )
203
198
# define Py_C_RECURSION_LIMIT 800
204
199
#elif defined(_WIN32 ) && defined(_M_ARM64 )
Original file line number Diff line number Diff line change 4
4
import sys
5
5
import unittest
6
6
7
- from test .support import swap_item , swap_attr
7
+ from test .support import swap_item , swap_attr , is_wasi
8
8
9
9
10
10
class RebindBuiltinsTests (unittest .TestCase ):
@@ -134,14 +134,15 @@ def test_eval_gives_lambda_custom_globals(self):
134
134
135
135
self .assertEqual (foo (), 7 )
136
136
137
+ @unittest .skipIf (is_wasi and Py_DEBUG , "requires too much stack" )
137
138
def test_load_global_specialization_failure_keeps_oparg (self ):
138
139
# https://github.com/python/cpython/issues/91625
139
140
class MyGlobals (dict ):
140
141
def __missing__ (self , key ):
141
142
return int (key .removeprefix ("_number_" ))
142
143
143
144
# Need more than 256 variables to use EXTENDED_ARGS
144
- variables = 270
145
+ variables = 400
145
146
code = "lambda: " + "+" .join (f"_number_{ i } " for i in range (variables ))
146
147
sum_func = eval (code , MyGlobals ())
147
148
expected = sum (range (variables ))
You can’t perform that action at this time.
0 commit comments