]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-108851: Fix tomllib recursion tests (GH-108853) (#109012)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 8 Sep 2023 13:18:02 +0000 (06:18 -0700)
committerGitHub <noreply@github.com>
Fri, 8 Sep 2023 13:18:02 +0000 (15:18 +0200)
commit55d7e8fef135a0ce69b0ed19c8b06a4fb04934d1
treebe27610b50104a74a86ffa5944807c5998f89060
parent038b0a9cb0e5fee6f8e7cd2f503b5f02971fc660
[3.12] gh-108851: Fix tomllib recursion tests (GH-108853) (#109012)

gh-108851: Fix tomllib recursion tests (GH-108853)

* Add get_recursion_available() and get_recursion_depth() functions
  to the test.support module.
* Change infinite_recursion() default max_depth from 75 to 100.
* Fix test_tomllib recursion tests for WASI buildbots: reduce the
  recursion limit and compute the maximum nested array/dict depending
  on the current available recursion limit.
* test.pythoninfo logs sys.getrecursionlimit().
* Enhance test_sys tests on sys.getrecursionlimit()
  and sys.setrecursionlimit().
(cherry picked from commit 8ff11425783806f8cb78e99f667546b1f7f3428e)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/pythoninfo.py
Lib/test/support/__init__.py
Lib/test/test_support.py
Lib/test/test_sys.py
Lib/test/test_tomllib/test_misc.py
Misc/NEWS.d/next/Tests/2023-09-03-21-18-35.gh-issue-108851.CCuHyI.rst [new file with mode: 0644]
Misc/NEWS.d/next/Tests/2023-09-03-21-41-10.gh-issue-108851.xFTYOE.rst [new file with mode: 0644]