Hypothesis

Latest version: v6.104.0

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

Scan your dependencies

Page 145 of 198

3.67.0

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

This release adds a ``width`` argument to :func:`~hypothesis.strategies.floats`,
to generate lower-precision floating point numbers for e.g. Numpy arrays.

The generated examples are always instances of Python's native ``float``
type, which is 64bit, but passing ``width=32`` will ensure that all values
can be exactly represented as 32bit floats. This can be useful to avoid
overflow (to +/- infinity), and for efficiency of generation and shrinking.

Half-precision floats (``width=16``) are also supported, but require Numpy
if you are running Python 3.5 or earlier.

3.66.33

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

This release fixes a bug in :func:`~hypothesis.strategies.floats`, where
setting ``allow_infinity=False`` and exactly one of ``min_value`` and
``max_value`` would allow infinite values to be generated.

3.66.32

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

This release adds type hints to the :obj:`example() <hypothesis.example>` and
:func:`~hypothesis.seed` decorators, and fixes the type hint on
:func:`~hypothesis.strategies.register_type_strategy`. The second argument to
:func:`~hypothesis.strategies.register_type_strategy` must either be a
``SearchStrategy``, or a callable which takes a ``type`` and returns a
``SearchStrategy``.

3.66.31

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

Another set of changes designed to improve the performance of shrinking on
large examples. In particular the shrinker should now spend considerably less
time running useless shrinks.

3.66.30

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

"Bug fixes and performance improvements".

This release is a fairly major overhaul of the shrinker designed to improve
its behaviour on large examples, especially around stateful testing. You
should hopefully see shrinking become much faster, with little to no quality
degradation (in some cases quality may even improve).

3.66.29

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

This release fixes two very minor bugs in the core engine:

* it fixes a corner case that was missing in :ref:`3.66.28 <v3.66.28>`, which
should cause shrinking to work slightly better.
* it fixes some logic for how shrinking interacts with the database that was
causing Hypothesis to be insufficiently aggressive about clearing out old
keys.

Page 145 of 198

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.