Skip to content

Commit ca91bd4

Browse files
committed
Use a limit of 100 frames
1 parent 3d7011c commit ca91bd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_functools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ def test_recursive_pickle(self):
334334
f.__setstate__((f, (), {}, {}))
335335
try:
336336
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
337-
with support.infinite_recursion():
337+
# gh-117008: Small limit since pickle uses C stack memory
338+
with support.infinite_recursion(100):
338339
with self.assertRaises(RecursionError):
339340
pickle.dumps(f, proto)
340341
finally:

0 commit comments

Comments
 (0)