Repository navigation
MAINT: don't assert RecursionError in monster dtype test - #30375
Merged
Merged
Conversation
jorenham
reviewed
Dec 4, 2025
|
This makes sense to me. For what it's worth, I was able to repro this with Here are runs from a test repo: https://github.com/colesbury/issue142253/actions/runs/19940622355 (100,000) |
Member
|
Thanks Nathan. Should we do the same for the list recursion test? |
Member
Author
|
Nope, that one is self-referential so it has to error eventually. |
charris
pushed a commit
to charris/numpy
that referenced
this pull request
Dec 4, 2025
* MAINT: don't assert RecursionError in monster dtype test * MAINT: use contextlib
charris
added a commit
that referenced
this pull request
Dec 4, 2025
MAINT: don't assert RecursionError in monster dtype test (#30375)
cakedev0
pushed a commit
to cakedev0/numpy
that referenced
this pull request
Dec 5, 2025
* MAINT: don't assert RecursionError in monster dtype test * MAINT: use contextlib
IndifferentArea
pushed a commit
to IndifferentArea/numpy
that referenced
this pull request
Dec 7, 2025
* MAINT: don't assert RecursionError in monster dtype test * MAINT: use contextlib
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #30370.
Newer CPython versions can recurse more deeply without raising a RecursionError and blowing out the stack. It happens that on x86_64 MacOS the
np.dtypecall succeeds and no error is raised. IMO it's fine if there's no error, the test was simply checking for the observed behavior of CPython and verifying that the case doesn't lead to a seg fault. See bb76bff for context.