Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 187 of 195

1.10.0

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

This is just a bugfix and performance release, but it changes some
semi-public APIs, hence the minor version bump.

* Significant performance improvements for strategies which are one\_of()
many branches. In particular this included recursive() strategies. This
should take the case where you use one recursive() strategy as the base
strategy of another from unusably slow (tens of seconds per generated
example) to reasonably fast.
* Better handling of just() and sampled_from() for values which have an
incorrect \_\_repr\_\_ implementation that returns non-ASCII unicode
on Python 2.
* Better performance for flatmap from changing the internal morpher API
to be significantly less general purpose.
* Introduce a new semi-public BuildContext/cleanup API. This allows
strategies to register cleanup activities that should run once the
example is complete. Note that this will interact somewhat weirdly with
find.
* Better simplification behaviour for streaming strategies.
* Don't error on lambdas which use destructuring arguments in Python 2.
* Add some better reprs for a few strategies that were missing good ones.
* The Random instances provided by randoms() are now copyable.
* Slightly more debugging information about simplify when using a debug
verbosity level.
* Support using given for functions with varargs, but not passing arguments
to it as positional.

1.9.0

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

Codename: The great bundling.

This release contains two fairly major changes.

The first is the deprecation of the hypothesis-extra mechanism. From
now on all the packages that were previously bundled under it other
than hypothesis-pytest (which is a different beast and will remain
separate). The functionality remains unchanged and you can still import
them from exactly the same location, they just are no longer separate
packages.

The second is that this introduces a new way of building strategies
which lets you build up strategies recursively from other strategies.

It also contains the minor change that calling .example() on a
strategy object will give you examples that are more representative of
the actual data you'll get. There used to be some logic in there to make
the examples artificially simple but this proved to be a bad idea.

1.8.5

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

This contains no functionality changes but fixes a mistake made with
building the previous package that would have broken installation on
Windows.

1.8.4

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

Bugs fixed:

* When a call to floats() had endpoints which were not floats but merely
convertible to one (e.g. integers), these would be included in the generated
data which would cause it to generate non-floats.
* Splitting lambdas used in the definition of flatmap, map or filter over
multiple lines would break the repr, which would in turn break their usage.

1.8.3

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

"Falsifying example" would not have been printed when the failure came from an
explicit example.

1.8.2

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

Another small bugfix release:

* When using ForkingTestCase you would usually not get the falsifying example
printed if the process exited abnormally (e.g. due to os._exit).
* Improvements to the distribution of characters when using text() with a
default alphabet. In particular produces a better distribution of ascii and
whitespace in the alphabet.

Page 187 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.