Hypothesis

Latest version: v6.104.0

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

Scan your dependencies

Page 189 of 198

1.12.0

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

* Significantly improved performance of creating strategies using the functions
from the hypothesis.strategies module by deferring the calculation of their
repr until it was needed. This is unlikely to have been an performance issue
for you unless you were using flatmap, composite or stateful testing, but for
some cases it could be quite a significant impact.
* A number of cases where the repr of strategies build from lambdas is improved
* Add dates() and times() strategies to hypothesis.extra.datetimes
* Add new 'profiles' mechanism to the settings system
* Deprecates mutability of Settings, both the Settings.default top level property
and individual settings.
* A Settings object may now be directly initialized from a parent Settings.
* given should now give a better error message if you attempt to use it with a
function that uses destructuring arguments (it still won't work, but it will
error more clearly),
* A number of spelling corrections in error messages
* :pypi:`pytest` should no longer display the intermediate modules Hypothesis generates
when running in verbose mode
* Hypothesis should now correctly handle printing objects with non-ascii reprs
on python 3 when running in a locale that cannot handle ascii printing to
stdout.
* Add a unique=True argument to lists(). This is equivalent to
unique_by=lambda x: x, but offers a more convenient syntax.

1.11.4

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

* Hide modifications Hypothesis needs to make to sys.path by undoing them
after we've imported the relevant modules. This is a workaround for issues
cryptography experienced on windows.
* Slightly improved performance of drawing from sampled_from on large lists
of alternatives.
* Significantly improved performance of drawing from one_of or strategies
using \| (note this includes a lot of strategies internally - floats()
and integers() both fall into this category). There turned out to be a
massive performance regression introduced in 1.10.0 affecting these which
probably would have made tests using Hypothesis significantly slower than
they should have been.

1.11.3

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

* Better argument validation for datetimes() strategy - previously setting
max_year < datetime.MIN_YEAR or min_year > datetime.MAX_YEAR would not have
raised an InvalidArgument error and instead would have behaved confusingly.
* Compatibility with being run on pytest < 2.7 (achieved by disabling the
plugin).

1.11.2

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

Bug fixes:

* Settings(database=my_db) would not be correctly inherited when used as a
default setting, so that newly created settings would use the database_file
setting and create an SQLite example database.
* Settings.default.database = my_db would previously have raised an error and
now works.
* Timeout could sometimes be significantly exceeded if during simplification
there were a lot of examples tried that didn't trigger the bug.
* When loading a heavily simplified example using a basic() strategy from the
database this could cause Python to trigger a recursion error.
* Remove use of deprecated API in pytest plugin so as to not emit warning

Misc:

* hypothesis-pytest is now part of hypothesis core. This should have no
externally visible consequences, but you should update your dependencies to
remove hypothesis-pytest and depend on only Hypothesis.
* Better repr for hypothesis.extra.datetimes() strategies.
* Add .close() method to abstract base class for Backend (it was already present
in the main implementation).

1.11.1

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

Bug fixes:

* When running Hypothesis tests in parallel (e.g. using pytest-xdist) there was a race
condition caused by code generation.
* Example databases are now cached per thread so as to not use sqlite connections from
multiple threads. This should make Hypothesis now entirely thread safe.
* floats() with only min_value or max_value set would have had a very bad distribution.
* Running on 3.5, Hypothesis would have emitted deprecation warnings because of use of
inspect.getargspec

1.11.0

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

* text() with a non-string alphabet would have used the repr() of the the alphabet
instead of its contexts. This is obviously silly. It now works with any sequence
of things convertible to unicode strings.
* given will now work on methods whose definitions contains no explicit positional
arguments, only varargs (:issue:`118`).
This may have some knock on effects because it means that given no longer changes the
argspec of functions other than by adding defaults.
* Introduction of new composite feature for more natural definition of strategies you'd
previously have used flatmap for.

Page 189 of 198

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.