Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 180 of 210

3.38.2

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

This release changes the behaviour of the :attr:`~hypothesis.settings.deadline`
setting when used with :func:`~hypothesis.strategies.data`: Time spent inside
calls to ``data.draw`` will no longer be counted towards the deadline time.

As a side effect of some refactoring required for this work, the way flaky
tests are handled has changed slightly. You are unlikely to see much difference
from this, but some error messages will have changed.

This work was funded by `Smarkets <https://smarkets.com/>`_.

3.38.1

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

This patch has a variety of non-user-visible refactorings, removing various
minor warts ranging from indirect imports to typos in comments.

3.38.0

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

This release overhauls :ref:`the health check system <healthchecks>`
in a variety of small ways.
It adds no new features, but is nevertheless a minor release because it changes
which tests are likely to fail health checks.

The most noticeable effect is that some tests that used to fail health checks
will now pass, and some that used to pass will fail. These should all be
improvements in accuracy. In particular:

* New failures will usually be because they are now taking into account things
like use of :func:`~hypothesis.strategies.data` and
:func:`~hypothesis.assume` inside the test body.
* New failures *may* also be because for some classes of example the way data
generation performance was measured was artificially faster than real data
generation (for most examples that are hitting performance health checks the
opposite should be the case).
* Tests that used to fail health checks and now pass do so because the health
check system used to run in a way that was subtly different than the main
Hypothesis data generation and lacked some of its support for e.g. large
examples.

If your data generation is especially slow, you may also see your tests get
somewhat faster, as there is no longer a separate health check phase. This will
be particularly noticeable when rerunning test failures.

This work was funded by `Smarkets <https://smarkets.com/>`_.

3.37.0

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

This is a deprecation release for some health check related features.

The following are now deprecated:

* Passing ``HealthCheck.exception_in_generation`` to
:attr:`~hypothesis.settings.suppress_health_check`. This no longer does
anything even when passed - All errors that occur during data generation
will now be immediately reraised rather than going through the health check
mechanism.
* Passing ``HealthCheck.random_module`` to
:attr:`~hypothesis.settings.suppress_health_check`. This hasn't done anything
for a long time, but was never explicitly deprecated. Hypothesis always seeds
the random module when running :func:`given <hypothesis.given>` tests, so this
is no longer an error and suppressing it doesn't do anything.
* Passing non-:class:`~hypothesis.HealthCheck` values in
:attr:`~hypothesis.settings.suppress_health_check`. This was previously
allowed but never did anything useful.

In addition, passing a non-iterable value as :attr:`~hypothesis.settings.suppress_health_check`
will now raise an error immediately (it would never have worked correctly, but
it would previously have failed later). Some validation error messages have
also been updated.

This work was funded by `Smarkets <https://smarkets.com/>`_.

3.36.1

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

This is a yak shaving release, mostly concerned with our own tests.

While :func:`~python:inspect.getfullargspec` was documented as deprecated
in Python 3.5, it never actually emitted a warning. Our code to silence
this (nonexistent) warning has therefore been removed.

We now run our tests with ``DeprecationWarning`` as an error, and made some
minor changes to our own tests as a result. This required similar upstream
updates to :pypi:`coverage` and :pypi:`execnet` (a test-time dependency via
:pypi:`pytest-xdist`).

There is no user-visible change in Hypothesis itself, but we encourage you
to consider enabling deprecations as errors in your own tests.

3.36.0

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

This release adds a setting to the public API, and does some internal cleanup:

- The :attr:`~hypothesis.settings.derandomize` setting is now documented (:issue:`890`)
- Removed - and disallowed - all 'bare excepts' in Hypothesis (:issue:`953`)
- Documented the ``strict`` setting as deprecated, and
updated the build so our docs always match deprecations in the code.

Page 180 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.