Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 191 of 210

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.

3.12.0

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

This release makes some major internal changes to how Hypothesis represents
data internally, as a prelude to some major engine changes that should improve
data quality. There are no API changes, but it's a significant enough internal
change that a minor version bump seemed warranted.

User facing impact should be fairly mild, but includes:

* All existing examples in the database will probably be invalidated. Hypothesis
handles this automatically, so you don't need to do anything, but if you see
all your examples disappear that's why.
* Almost all data distributions have changed significantly. Possibly for the better,
possibly for the worse. This may result in new bugs being found, but it may
also result in Hypothesis being unable to find bugs it previously did.
* Data generation may be somewhat faster if your existing bottleneck was in
draw_bytes (which is often the case for large examples).
* Shrinking will probably be slower, possibly significantly.

If you notice any effects you consider to be a significant regression, please
open an issue about them.

3.11.6

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

This release involves no functionality changes, but is the first to ship wheels
as well as an sdist.

Page 191 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.