This release teaches "builds()" to use "deferred()" when resolving
unrecognised type hints, so that you can conveniently register
strategies for recursive types with constraints on some arguments
(issue #3026):
class RecursiveClass:
def init(self, value: int, next_node: typing.Optional["SomeClass"]):
assert value > 0
self.value = value
self.next_node = next_node
st.register_type_strategy(
RecursiveClass, st.builds(RecursiveClass, value=st.integers(min_value=1))
)
The canonical version of these notes (with links) is on readthedocs.