Skip to content

gh-140125: Increase object recursion depth for test_json from 200k to 500k - #142226

Merged
vstinner merged 2 commits into
python:mainfrom
zanieb:zb/test_json_rec
Dec 8, 2025
Merged

gh-140125: Increase object recursion depth for test_json from 200k to 500k#142226
vstinner merged 2 commits into
python:mainfrom
zanieb:zb/test_json_rec

Conversation

@zanieb

@zaniebzanieb commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

It appears increasing this recursion depth of the object resolves the issue where it can fail to hit the stack limit on macOS during PGO.

The PGO test runtime seemed unaffected on macOS and the test runtime in CI here seems within noise.

@zanieb

Copy link
Copy Markdown
ContributorAuthor

From some microbenchmarks, this adds like 80ms or so on my machine, which seems negligible.

@zaniebzanieb changed the title gh-140125: Increase recursion depth for test_json from 200k to 500kgh-140125: Increase object recursion depth for test_json from 200k to 500kDec 4, 2025
@zanieb
zanieb marked this pull request as ready for review December 4, 2025 18:53
@zanieb
zanieb requested a review from vstinnerDecember 5, 2025 13:58

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment threadLib/test/test_json/test_recursion.py Outdated
Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinnervstinner added the needs backport to 3.14 bugs and security fixes label Dec 8, 2025
@vstinner
vstinner merged commit e3539e9 into python:mainDec 8, 2025
46 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @zanieb for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 8, 2025
… 200k to 500k (pythonGH-142226)
(cherry picked from commit e3539e9)
Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app

Copy link
Copy Markdown

GH-142416 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Dec 8, 2025
@vstinner

Copy link
Copy Markdown
Member

@zanieb: Merged, thanks. I backported the change to 3.14 since you wrote that 3.14.1 is also affected by the issue. I don't think that 3.13 needs a backported. Correct me if I'm wrong.

@zanieb

Copy link
Copy Markdown
ContributorAuthor

That's correct. Thank you for backporting <3 I was just coming to ask for that

vstinner added a commit that referenced this pull request Dec 8, 2025
…m 200k to 500k (GH-142226) (#142416)
gh-140125: Increase object recursion depth for `test_json` from 200k to 500k (GH-142226)
(cherry picked from commit e3539e9)
Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Victor Stinner <vstinner@python.org>
zanieb added a commit to astral-sh/python-build-standalone that referenced this pull request May 2, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@zanieb@vstinner