Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 73 of 195

5.28.0

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

:func:`~hypothesis.strategies.from_type` can now resolve :class:`~python:typing.TypeVar`
instances when the ``bound`` is a :class:`~python:typing.ForwardRef`, so long as that name
is in fact defined in the same module as the typevar (no ``TYPE_CHECKING`` tricks, sorry).
This feature requires Python 3.7 or later.

Thanks to Zac Hatfield-Dodds and Nikita Sobolev for this feature!

5.27.0

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

This patch adds two new :doc:`ghostwriters <ghostwriter>` to test
:wikipedia:`binary operations <Binary_operation>`, like :func:`python:operator.add`,
and Numpy :doc:`ufuncs <numpy:reference/ufuncs>` and :doc:`gufuncs
<numpy:reference/c-api/generalized-ufuncs>` like :data:`np.matmul() <numpy:numpy.matmul>`.

5.26.1

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

This release improves the performance of some methods in Hypothesis's internal
automaton library. These are currently only lightly used by user code, but
this may result in slightly faster shrinking.

5.26.0

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

:func:`~hypothesis.strategies.register_type_strategy` no longer accepts
parametrised user-defined generic types, because the resolution logic
was quite badly broken (:issue:`2537`).

Instead of registering a strategy for e.g. ``MyCollection[int]``, you
should register a *function* for ``MyCollection`` and `inspect the type
parameters within that function <https://stackoverflow.com/q/48572831>`__.

Thanks to Nikita Sobolev for the bug report, design assistance, and
pull request to implement this feature!

5.25.0

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

Tired of writing tests? Or new to Hypothesis and not sure where to start?

This release is for you! With our new :doc:`Ghostwriter functions <ghostwriter>`
and :command:`hypothesis write ...` :ref:`command-line interface <hypothesis-cli>`,
you can stop writing tests entirely... or take the source code Hypothesis
writes for you as a starting point.

This has been in the works for months, from :issue:`2118` to versions

5.24.4

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

This patch adds yet more internal functions to support a new feature
we're working on, like :ref:`version 5.18.3 <v5.18.3>` and
:ref:`version 5.23.6 <v5.23.6>`. We promise it's worth the wait!

Page 73 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.