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
Fix recursion issues #3687
Merged
Merged
Fix recursion issues #3687
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5c4622a
Failing test
jobh 952485e
Fix ignore-warnings for threaded test
jobh 9de7b9b
Fix failing test for registered recursive strategy
jobh b45eb3e
Fix recursive inference for builtins
jobh 5641bcb
Consistent stack depth limit
jobh 23e7975
Fix f-string
jobh ff3390e
Improve extract_lambda_source
jobh 5dd6c2c
Remove pragma that is not needed on python 3.10+
jobh 106f1ca
Formatting fix
jobh 80f8ae1
Test failures +style +RELEASE.rst
jobh 395ef47
Add pragma: no cover to a couple of excepts
jobh 691b021
Fix ghostwriter failure caused by deferring more strategies in builds()
jobh aea7cdd
Wrap the actual nicerepr call, not just the string interpolation
jobh e898a62
Fix (un-share) contextvar default value
jobh File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
RELEASE_TYPE: patch | ||
|
||
Fixes some lingering issues with inference of recursive types | ||
in `~hypothesis.strategies.from_type`. Closes :issue:`3525`. | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example in #3026 (comment), actually didn't work now, because
Optional[RecursiveClass].__module__
istyping
.(RecursiveClass|None).__module__
istypes
, so that happened to work. Andbuiltins
is probably also unnecessary because relevant builtins are registered in_global_type_lookup
anyway.Long story short: Unless there's a reason I don't see, just remove the
__module__
check and everything is fine.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI, this was the cause of the ghostwriter failures (now fixed).