Hypothesis

Latest version: v6.104.0

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

Scan your dependencies

Page 176 of 198

3.21.3

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

This release fixes some extremely specific circumstances that probably have
never occurred in the wild where users of
:func:`~hypothesis.strategies.deferred` might have seen a :class:`python:RuntimeError` from
too much recursion, usually in cases where no valid example could have been
generated anyway.

3.21.2

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

This release fixes some minor bugs in argument validation:

* :ref:`hypothesis.extra.numpy <hypothesis-numpy>` dtype strategies would raise an internal error
instead of an InvalidArgument exception when passed an invalid
endianness specification.
* :func:`~hypothesis.strategies.fractions` would raise an internal error instead of an InvalidArgument
if passed ``float("nan")`` as one of its bounds.
* The error message for passing ``float("nan")`` as a bound to various
strategies has been improved.
* Various bound arguments will now raise InvalidArgument in cases where
they would previously have raised an internal TypeError or
ValueError from the relevant conversion function.
* ``streaming()`` would not have emitted a
deprecation warning when called with an invalid argument.

3.21.1

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

This release fixes a bug where test failures that were the result of
an :obj:`example <hypothesis.example>` would print an extra stack trace before re-raising the
exception.

3.21.0

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

This release deprecates Hypothesis's strict mode, which turned Hypothesis's
deprecation warnings into errors. Similar functionality can be achieved
by using :func:`simplefilter('error', HypothesisDeprecationWarning) <python:warnings.simplefilter>`.

3.20.0

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

This release renames the relevant arguments on the
:func:`~hypothesis.strategies.datetimes`, :func:`~hypothesis.strategies.dates`,
:func:`~hypothesis.strategies.times`, and :func:`~hypothesis.strategies.timedeltas`
strategies to ``min_value`` and ``max_value``, to make them consistent with the
other strategies in the module.

The old argument names are still supported but will emit a deprecation warning
when used explicitly as keyword arguments. Arguments passed positionally will
go to the new argument names and are not deprecated.

3.19.3

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

This release provides a major overhaul to the internals of how Hypothesis
handles shrinking.

This should mostly be visible in terms of getting better examples for tests
which make heavy use of :func:`~hypothesis.strategies.composite`,
:func:`~hypothesis.strategies.data` or :ref:`flatmap <flatmap>` where the data
drawn depends a lot on previous choices, especially where size parameters are
affected. Previously Hypothesis would have struggled to reliably produce
good examples here. Now it should do much better. Performance should also be
better for examples with a non-zero ``min_size``.

You may see slight changes to example generation (e.g. improved example
diversity) as a result of related changes to internals, but they are unlikely
to be significant enough to notice.

Page 176 of 198

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.