Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 62 of 195

6.1.1

------------------

This patch updates our automatic code formatting to use :pypi:`shed`,
which includes :pypi:`autoflake`, :pypi:`black`, :pypi:`isort`, and
:pypi:`pyupgrade` (:issue:`2780`).

6.1.0

------------------

This release teaches Hypothesis to distinguish between errors based on the
`__cause__ or __context__ of otherwise identical exceptions
<https://docs.python.org/3/library/exceptions.html>`__, which is particularly
useful when internal errors can be wrapped by a library-specific or semantically
appropriate exception such as:

.. code-block:: python

try:
do_the_thing(foo, timeout=10)
except Exception as err:
raise FooError("Failed to do the thing") from err

Earlier versions of Hypothesis only see the ``FooError``, while we can now
distinguish a ``FooError`` raised because of e.g. an internal assertion from
one raised because of a ``TimeoutExceeded`` exception.

6.0.4

------------------

This release prevents a race condition inside :func:`~hypothesis.strategies.recursive` strategies.
The race condition occurs when the same :func:`~hypothesis.strategies.recursive` strategy is shared among tests
that are running in multiple threads (:issue:`2717`).

6.0.3

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

This patch improves the type annotations for :func:`~hypothesis.strategies.one_of`,
by adding overloads to handle up to five distinct arguments as
:obj:`~python:typing.Union` before falling back to :obj:`~python:typing.Any`,
as well as annotating the ``|`` (``__or__``) operator for strategies (:issue:`2765`).

6.0.2

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

This release makes some small improvements to how filtered strategies work. It should improve the performance of shrinking filtered strategies,
and may under some (probably rare) circumstances improve the diversity of generated examples.

6.0.1

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

This patch fixes an interaction where our :ref:`test statistics <statistics>`
handling made Pytest's ``--junit-xml`` output fail to validate against the
strict ``xunit2`` schema (:issue:`1975`).

Page 62 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.