Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Skip test for WASI
  • Loading branch information
markshannon committed May 3, 2024
commit 1831eb3939164dd9493f82668f86dffeb5b15135
7 changes: 1 addition & 6 deletions Include/cpython/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,7 @@ struct _ts {
#ifdef Py_DEBUG
// A debug build is likely built with low optimization level which implies
// higher stack memory usage than a release build: use a lower limit.
# if defined(__wasi__)
// Based on wasmtime 16.
# define Py_C_RECURSION_LIMIT 300
# else
# define Py_C_RECURSION_LIMIT 500
# endif
# define Py_C_RECURSION_LIMIT 500
#elif defined(__s390x__)
# define Py_C_RECURSION_LIMIT 800
#elif defined(_WIN32) && defined(_M_ARM64)
Expand Down
5 changes: 3 additions & 2 deletions Lib/test/test_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
import unittest

from test.support import swap_item, swap_attr
from test.support import swap_item, swap_attr, is_wasi


class RebindBuiltinsTests(unittest.TestCase):
Expand Down Expand Up @@ -134,14 +134,15 @@ def test_eval_gives_lambda_custom_globals(self):

self.assertEqual(foo(), 7)

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

# Need more than 256 variables to use EXTENDED_ARGS
variables = 270
variables = 400
code = "lambda: " + "+".join(f"_number_{i}" for i in range(variables))
sum_func = eval(code, MyGlobals())
expected = sum(range(variables))
Expand Down