Hypothesis

Latest version: v6.100.5

Safety actively analyzes 625051 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 13 of 195

6.89.0

-------------------

This release teaches :func:`~hypothesis.strategies.from_type` to handle constraints
implied by the :pypi:`annotated-types` package - as used by e.g. :pypi:`Pydantic`.
This is usually efficient, but falls back to filtering in a few remaining cases.

Thanks to Viicos for :pull:`3780`!

6.88.4

-------------------

This patch adds a warning when :func:`st.composite <hypothesis.strategies.composite>`
wraps a function annotated as returning a :class:`~hypothesis.strategies.SearchStrategy`,
since this is usually an error (:issue:`3786`). The function should return a value,
and the decorator will convert it to a function which returns a strategy.

6.88.3

-------------------

This patch refactors ``from_type(typing.Tuple)``, allowing
:func:`~hypothesis.strategies.register_type_strategy` to take effect
for tuples instead of being silently ignored (:issue:`3750`).

Thanks to Nick Collins for reporting and extensive work on this issue.

6.88.2

-------------------

This patch improves the speed of the explain phase on python 3.12+, by using the new
:mod:`sys.monitoring` module to collect coverage, instead of :obj:`sys.settrace`.

Thanks to Liam DeVoe for :pull:`3776`!

6.88.1

-------------------

This patch improves :func:`~hypothesis.strategies.register_type_strategy` when used with ``tuple`` subclasses,
by preventing them from being interpreted as generic and provided to strategies like ``st.from_type(Sequence[int])``
(:issue:`3767`).

6.88.0

-------------------

This release allows strategy-generating functions registered with
:func:`~hypothesis.strategies.register_type_strategy` to conditionally not
return a strategy, by returning :data:`NotImplemented` (:issue:`3767`).

Page 13 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.