Hypothesis

Latest version: v6.99.13

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

Scan your dependencies

Page 113 of 194

4.14.4

Not secure
-------------------

This release fixes a bug that prevented
:func:`~hypothesis.strategies.random_module`
from correctly restoring the previous state of the ``random`` module.

The random state was instead being restored to a temporary deterministic
state, which accidentally caused subsequent tests to see the same random values
across multiple test runs.

4.14.3

Not secure
-------------------

This patch adds an internal special case to make
:func:`sampled_from(...).filter(...) <hypothesis.strategies.sampled_from>`
much more efficient when the filter rejects most elements (:issue:`1885`).

4.14.2

Not secure
-------------------

This patch improves the error message if the function ``f`` in
:ref:`s.flatmap(f) <flatmap>` does not return a strategy.

Thanks to Kai Chen for this change!

4.14.1

Not secure
-------------------

This release modifies how Hypothesis selects operations to run during shrinking,
by causing it to deprioritise previously useless classes of shrink until others have reached a fixed point.

This avoids certain pathological cases where the shrinker gets very close to finishing and then takes a very long time to finish the last small changes because it tries many useless shrinks for each useful one towards the end.
It also should cause a more modest improvement (probably no more than about 30%) in shrinking performance for most tests.

4.14.0

Not secure
-------------------

This release blocks installation of Hypothesis on Python 3.4, which
:PEP:`reached its end of life date on 2019-03-18 <429>`.

This should not be of interest to anyone but downstream maintainers -
if you are affected, migrate to a secure version of Python as soon as
possible or at least seek commercial support.

4.13.0

Not secure
-------------------

This release makes it an explicit error to call
:func:`floats(min_value=inf, exclude_min=True) <hypothesis.strategies.floats>` or
:func:`floats(max_value=-inf, exclude_max=True) <hypothesis.strategies.floats>`,
as there are no possible values that can be generated (:issue:`1859`).

:func:`floats(min_value=0.0, max_value=-0.0) <hypothesis.strategies.floats>`
is now deprecated. While ``0. == -0.`` and we could thus generate either if
comparing by value, violating the sequence ordering of floats is a special
case we don't want or need.

Page 113 of 194

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.