Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 188 of 195

1.8.1

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

This is a small release that contains a workaround for people who have
bad reprs returning non ascii text on Python 2.7. This is not a bug fix
for Hypothesis per se because that's not a thing that is actually supposed
to work, but Hypothesis leans more heavily on repr than is typical so it's
worth having a workaround for.

1.8.0

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

New features:

* Much more sensible reprs for strategies, especially ones that come from
hypothesis.strategies. These should now have as reprs python code that
would produce the same strategy.
* lists() accepts a unique_by argument which forces the generated lists to be
only contain elements unique according to some function key (which must
return a hashable value).
* Better error messages from flaky tests to help you debug things.

Mostly invisible implementation details that may result in finding new bugs
in your code:

* Sets and dictionary generation should now produce a better range of results.
* floats with bounds now focus more on 'critical values', trying to produce
values at edge cases.
* flatmap should now have better simplification for complicated cases, as well
as generally being (I hope) more reliable.

Bug fixes:

* You could not previously use assume() if you were using the forking executor.

1.7.2

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

This is purely a bug fix release:

* When using floats() with stale data in the database you could sometimes get
values in your tests that did not respect min_value or max_value.
* When getting a Flaky error from an unreliable test it would have incorrectly
displayed the example that caused it.
* 2.6 dependency on backports was incorrectly specified. This would only have
caused you problems if you were building a universal wheel from Hypothesis,
which is not how Hypothesis ships, so unless you're explicitly building wheels
for your dependencies and support Python 2.6 plus a later version of Python
this probably would never have affected you.
* If you use flatmap in a way that the strategy on the right hand side depends
sensitively on the left hand side you may have occasionally seen Flaky errors
caused by producing unreliable examples when minimizing a bug. This use case
may still be somewhat fraught to be honest. This code is due a major rearchitecture
for 1.8, but in the meantime this release fixes the only source of this error that
I'm aware of.

1.7.1

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

Codename: There is no 1.7.0.

A slight technical hitch with a premature upload means there's was a yanked
1.7.0 release. Oops.

The major feature of this release is Python 2.6 support. Thanks to Jeff Meadows
for doing most of the work there.

Other minor features

* strategies now has a permutations() function which returns a strategy
yielding permutations of values from a given collection.
* if you have a flaky test it will print the exception that it last saw before
failing with Flaky, even if you do not have verbose reporting on.
* Slightly experimental git merge script available as "python -m
hypothesis.tools.mergedbs". Instructions on how to use it in the docstring
of that file.

Bug fixes:

* Better performance from use of filter. In particular tests which involve large
numbers of heavily filtered strategies should perform a lot better.
* floats() with a negative min_value would not have worked correctly (worryingly,
it would have just silently failed to run any examples). This is now fixed.
* tests using sampled\_from would error if the number of sampled elements was smaller
than min\_satisfying\_examples.

1.6.2

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

This is just a few small bug fixes:

* Size bounds were not validated for values for a binary() strategy when
reading examples from the database.
* sampled\_from is now in __all__ in hypothesis.strategies
* floats no longer consider negative integers to be simpler than positive
non-integers
* Small floating point intervals now correctly count members, so if you have a
floating point interval so narrow there are only a handful of values in it,
this will no longer cause an error when Hypothesis runs out of values.

1.6.1

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

This is a small patch release that fixes a bug where 1.6.0 broke the use
of flatmap with the deprecated API and assumed the passed in function returned
a SearchStrategy instance rather than converting it to a strategy.

Page 188 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.