Hypothesis

Latest version: v6.104.0

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

Scan your dependencies

Page 55 of 198

6.17.1

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

This patch moves some internal helper code in preparation for :issue:`3065`.
There is no user-visible change, unless you depended on undocumented internals.

6.17.0

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

This release adds type annotations to the :doc:`stateful testing <stateful>` API.

Thanks to Ruben Opdebeeck for this contribution!

6.16.0

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

This release adds the :class:`~hypothesis.strategies.DrawFn` type as a reusable
type hint for the ``draw`` argument of
:func:`composite <hypothesis.strategies.composite>` functions.

Thanks to Ruben Opdebeeck for this contribution!

6.15.0

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

This release emits a more useful error message when :func:`given() <hypothesis.given>`
is applied to a coroutine function, i.e. one defined using ``async def`` (:issue:`3054`).

This was previously only handled by the generic :obj:`~hypothesis.HealthCheck.return_value`
health check, which doesn't direct you to use either :ref:`a custom executor <custom-function-execution>`
or a library such as :pypi:`pytest-trio` or :pypi:`pytest-asyncio` to handle it for you.

6.14.9

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

This patch fixes a regression in Hypothesis 6.14.8, where :func:`~hypothesis.strategies.from_type`
failed to resolve types which inherit from multiple parametrised generic types,
affecting the :pypi:`returns` package (:issue:`3060`).

6.14.8

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

This patch ensures that registering a strategy for a subclass of a a parametrised
generic type such as ``class Lines(Sequence[str]):`` will not "leak" into unrelated
strategies such as ``st.from_type(Sequence[int])`` (:issue:`2951`).
Unfortunately this fix requires :pep:`560`, meaning Python 3.7 or later.

Page 55 of 198

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.