Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 81 of 195

5.12.2

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

This patch teaches the :func:`~hypothesis.strategies.from_type` internals to
return slightly more efficient strategies for some generic sets and mappings.

5.12.1

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

This patch adds a `` noqa`` comment for :pypi:`flake8` 3.8.0, which
disagrees with :pypi:`mypy` about how to write the type of ``...``.

5.12.0

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

This release limits the maximum duration of the shrinking phase to five minutes,
so that Hypothesis does not appear to hang when making very slow progress
shrinking a failing example (:issue:`2340`).

If one of your tests triggers this logic, we would really appreciate a bug
report to help us improve the shrinker for difficult but realistic workloads.

5.11.0

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

This release improves the interaction between :func:`~hypothesis.assume`
and the :obj:`example() <hypothesis.example>` decorator, so that the
following test no longer fails with ``UnsatisfiedAssumption`` (:issue:`2125`):

.. code-block:: python

given(value=floats(0, 1))
example(value=0.56789) used to make the test fail!
pytest.mark.parametrize("threshold", [0.5, 1])
def test_foo(threshold, value):
assume(value < threshold)
...

5.10.5

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

If you have :pypi:`django` installed but don't use it, this patch will make
``import hypothesis`` a few hundred milliseconds faster (e.g. 0.704s -> 0.271s).

Thanks to :pypi:`importtime-waterfall` for highlighting this problem and
`Jake Vanderplas <https://twitter.com/jakevdp/status/1130983439862181888>`__ for
the solution - it's impossible to misuse code from a module you haven't imported!

5.10.4

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

This patch improves the internals of :func:`~hypothesis.strategies.builds` type
inference, to handle recursive forward references in certain dataclasses.
This is useful for e.g. :pypi:`hypothesmith`'s forthcoming :pypi:`LibCST` mode.

Page 81 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.