Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 174 of 210

3.44.19

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

This changes how we compute the default ``average_size`` for all collection
strategies. Previously setting a ``max_size`` without setting an
``average_size`` would have the seemingly paradoxical effect of making data
generation *slower*, because it would raise the average size from its default.
Now setting ``max_size`` will either leave the default unchanged or lower it
from its default.

If you are currently experiencing this problem, this may make your tests
substantially faster. If you are not, this will likely have no effect on you.

3.44.18

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

This is a small refactoring release that changes how Hypothesis detects when
the structure of data generation depends on earlier values generated (e.g. when
using :ref:`flatmap <flatmap>` or :func:`~hypothesis.strategies.composite`).
It should not have any observable effect on behaviour.

3.44.17

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

This release fixes a typo in internal documentation, and has no user-visible impact.

3.44.16

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

This release improves test case reduction for recursive data structures.
Hypothesis now guarantees that whenever a strategy calls itself recursively
(usually this will happen because you are using :func:`~hypothesis.strategies.deferred`),
any recursive call may replace the top level value. e.g. given a tree structure,
Hypothesis will always try replacing it with a subtree.

Additionally this introduces a new heuristic that may in some circumstances
significantly speed up test case reduction - Hypothesis should be better at
immediately replacing elements drawn inside another strategy with their minimal
possible value.

3.44.15

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

:func:`~hypothesis.strategies.from_type` can now resolve recursive types
such as binary trees (:issue:`1004`). Detection of non-type arguments has
also improved, leading to better error messages in many cases involving
:pep:`forward references <484forward-references>`.

3.44.14

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

This release fixes a bug in the shrinker that prevented the optimisations in
:ref:`3.44.6 <v3.44.6>` from working in some cases. It would not have worked correctly when
filtered examples were nested (e.g. with a set of integers in some range).

This would not have resulted in any correctness problems, but shrinking may
have been slower than it otherwise could be.

Page 174 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.