Hypothesis

Latest version: v6.99.13

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

Scan your dependencies

Page 175 of 194

3.15.0

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

This release deprecates two strategies, ``choices()`` and ``streaming()``.

Both of these are somewhat confusing to use and are entirely redundant since the
introduction of the :func:`~hypothesis.strategies.data` strategy for interactive
drawing in tests, and their use should be replaced with direct use of
:func:`~hypothesis.strategies.data` instead.

3.14.2

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

This fixes a bug where Hypothesis would not work correctly on Python 2.7 if you
had the :mod:`python:typing` module :pypi:`backport <typing>` installed.

3.14.1

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

This raises the maximum depth at which Hypothesis starts cutting off data
generation to a more reasonable value which it is harder to hit by accident.

This resolves (:issue:`751`), in which some examples which previously worked
would start timing out, but it will also likely improve the data generation
quality for complex data types.

3.14.0

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

Hypothesis now understands inline type annotations (:issue:`293`):

- If the target of :func:`~hypothesis.strategies.builds` has type annotations,
a default strategy for missing required arguments is selected based on the
type. Type-based strategy selection will only override a default if you
pass :const:`hypothesis.infer` as a keyword argument.

- If :func:`given <hypothesis.given>` wraps a function with type annotations,
you can pass :const:`~hypothesis.infer` as a keyword argument and the
appropriate strategy will be substituted.

- You can check what strategy will be inferred for a type with the new
:func:`~hypothesis.strategies.from_type` function.

- :func:`~hypothesis.strategies.register_type_strategy` teaches Hypothesis
which strategy to infer for custom or unknown types. You can provide a
strategy, or for more complex cases a function which takes the type and
returns a strategy.

3.13.1

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

This is a bug fix release for :issue:`514` - Hypothesis would continue running
examples after a :class:`~python:unittest.SkipTest` exception was raised,
including printing a falsifying example. Skip exceptions from the standard
:mod:`python:unittest` module, and ``pytest``, ``nose``, or ``unittest2``
modules now abort the test immediately without printing output.

3.13.0

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

This release has two major aspects to it: The first is the introduction of
:func:`~hypothesis.strategies.deferred`, which allows more natural definition
of recursive (including mutually recursive) strategies.

The second is a number of engine changes designed to support this sort of
strategy better. These should have a knock-on effect of also improving the
performance of any existing strategies that currently generate a lot of data
or involve heavy nesting by reducing their typical example size.

Page 175 of 194

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.