Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ fi
# On 3.14+ `test_json.test_recursion.TestCRecursion.test_highly_nested_objects_decoding` fails during
# PGO due to RecursionError not being raised as expected. See https://github.com/python/cpython/issues/140125
if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]]; then
PROFILE_TASK="${PROFILE_TASK} --ignore test_json"
patch -p1 -i "${ROOT}/patch-test-json.patch"
fi

# ./configure tries to auto-detect whether it can build 128-bit and 256-bit SIMD helpers for HACL,
Expand Down
28 changes: 28 additions & 0 deletions cpython-unix/patch-test-json.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
commit c7281478147d2a3859dd04ed3729593e9e4f2b73
Author: Zanie Blue <contact@zanie.dev>
Date: Wed Dec 3 08:17:23 2025 -0600

Increase recursion depth for `test_json` from 200k to 500k

diff --git a/Lib/test/test_json/test_recursion.py b/Lib/test/test_json/test_recursion.py
index 5d7b56ff9ad..3110ce746b8 100644
--- a/Lib/test/test_json/test_recursion.py
+++ b/Lib/test/test_json/test_recursion.py
@@ -71,7 +71,7 @@ def default(self, o):
@support.skip_emscripten_stack_overflow()
@support.skip_wasi_stack_overflow()
def test_highly_nested_objects_decoding(self):
- very_deep = 200000
+ very_deep = 500000
# test that loading highly-nested objects doesn't segfault when C
# accelerations are used. See #12017
with self.assertRaises(RecursionError):
@@ -90,7 +90,7 @@ def test_highly_nested_objects_decoding(self):
def test_highly_nested_objects_encoding(self):
# See #12051
l, d = [], {}
- for x in range(200_000):
+ for x in range(500_000):
l, d = [l], {'k':d}
with self.assertRaises(RecursionError):
with support.infinite_recursion(5000):