-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3986 from Zac-HD/better-annotated-resolution
Improve handling of GroupedMetadata
- Loading branch information
Showing
4 changed files
with
74 additions
and
20 deletions.
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,13 @@ | ||
RELEASE_TYPE: minor | ||
|
||
This release improves our support for the :pypi:`annotated-types` iterable | ||
``GroupedMetadata`` protocol. In order to treat the elements "as if they | ||
had been unpacked", if one such element is a :class:`~hypothesis.strategies.SearchStrategy` | ||
we now resolve to that strategy. Previously, we treated this as an unknown | ||
filter predicate. | ||
|
||
We expect this to be useful for libraries implementing custom metadata - | ||
instead of requiring downstream integration, they can implement the protocol | ||
and yield a lazily-created strategy. Doing so only if Hypothesis is in | ||
:obj:`sys.modules` gives powerful integration with no runtime overhead | ||
or extra dependencies. |
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