Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 156 of 210

3.68.2

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

This change fixes a small bug in how the core engine caches the results of
previously-tried inputs. The effect is unlikely to be noticeable, but it might
avoid unnecessary work in some cases.

3.68.1

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

This patch documents the :func:`~hypothesis.extra.numpy.from_dtype` function,
which infers a strategy for :class:`numpy:numpy.dtype`\ s. This is used in
:func:`~hypothesis.extra.numpy.arrays`, but can also be used directly when
creating e.g. Pandas objects.

3.68.0

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

:func:`~hypothesis.extra.numpy.arrays` now checks that integer and float
values drawn from ``elements`` and ``fill`` strategies can be safely cast
to the dtype of the array, and emits a warning otherwise (:issue:`1385`).

Elements in the resulting array could previously violate constraints on
the elements strategy due to floating-point overflow or truncation of
integers to fit smaller types.

3.67.1

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

This release contains a tiny refactoring of the internals.
There is no user-visible change.

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.

Page 156 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.