Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.11] gh-108851: Fix tomllib recursion tests (#108853) #109013

Merged
merged 1 commit into from Sep 6, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 6, 2023

  • 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().

Backport notes:

  • Set support.infinite_recursion() minimumum to 4 frames.
  • test_support.test_get_recursion_depth() uses limit-2, apparently f-string counts for 2 frames in Python 3.11.
  • test_sys.test_setrecursionlimit_to_depth() tests depth+2 instead of depth+1.

(cherry picked from commit 8ff1142)

* 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().

Backport notes:

* Set support.infinite_recursion() minimum to 4 frames.
* test_support.test_get_recursion_depth() uses limit-2, apparently
  f-string counts for 2 frames in Python 3.11.
* test_sys.test_setrecursionlimit_to_depth() tests depth+2 instead of
  depth+1.

(cherry picked from commit 8ff1142)
@vstinner vstinner enabled auto-merge (squash) September 6, 2023 16:00
@vstinner vstinner merged commit 95eb984 into python:3.11 Sep 6, 2023
20 of 21 checks passed
@vstinner vstinner deleted the support_recursive311 branch September 6, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants