Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 12 of 195

6.90.0

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

This release makes it an error to assign ``settings = settings(...)``
as a class attribute on a :class:`~hypothesis.stateful.RuleBasedStateMachine`.
This has never had any effect, and it should be used as a decorator instead:

.. code-block: python

class BadMachine(RuleBasedStateMachine):
"""This doesn't do anything, and is now an error!"""
settings = settings(derandomize=True)

settings(derandomize=True)
class GoodMachine(RuleBasedStateMachine):
"""This is the right way to do it :-)"""

6.89.1

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

This patch refactors some internals. There is no user-visible change,
but we hope to improve performance and unlock support for alternative
backends such as :pypi:`symbolic execution with crosshair <crosshair-tool>`
in future (:issue:`3086`).

Thanks to Liam DeVoe for this fantastic contribution!

6.89.0

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

This release teaches :func:`~hypothesis.strategies.from_type` to handle constraints
implied by the :pypi:`annotated-types` package - as used by e.g. :pypi:`Pydantic`.
This is usually efficient, but falls back to filtering in a few remaining cases.

Thanks to Viicos for :pull:`3780`!

6.88.4

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

This patch adds a warning when :func:`st.composite <hypothesis.strategies.composite>`
wraps a function annotated as returning a :class:`~hypothesis.strategies.SearchStrategy`,
since this is usually an error (:issue:`3786`). The function should return a value,
and the decorator will convert it to a function which returns a strategy.

6.88.3

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

This patch refactors ``from_type(typing.Tuple)``, allowing
:func:`~hypothesis.strategies.register_type_strategy` to take effect
for tuples instead of being silently ignored (:issue:`3750`).

Thanks to Nick Collins for reporting and extensive work on this issue.

6.88.2

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

This patch improves the speed of the explain phase on python 3.12+, by using the new
:mod:`sys.monitoring` module to collect coverage, instead of :obj:`sys.settrace`.

Thanks to Liam DeVoe for :pull:`3776`!

Page 12 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.