Hypothesis

Latest version: v6.99.13

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

Scan your dependencies

Page 95 of 194

4.46.0

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

This release changes the behaviour of :func:`~hypothesis.strategies.floats`
when excluding signed zeros - ``floats(max_value=0.0, exclude_max=True)``
can no longer generate ``-0.0`` nor the much rarer
``floats(min_value=-0.0, exclude_min=True)`` generate ``+0.0``.

The correct interaction between signed zeros and exclusive endpoints was unclear;
we now enforce the invariant that :func:`~hypothesis.strategies.floats` will
never generate a value equal to an excluded endpoint (:issue:`2201`).

If you prefer the old behaviour, you can pass ``floats(max_value=-0.0)`` or
``floats(min_value=0.0)`` which is exactly equivalent and has not changed.
If you had *two* endpoints equal to zero, we recommend clarifying your tests by using
:func:`~hypothesis.strategies.just` or :func:`~hypothesis.strategies.sampled_from`
instead of :func:`~hypothesis.strategies.floats`.

4.45.1

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

This patch improves the error message when invalid arguments are passed
to :func:`~hypothesis.stateful.rule` or :func:`~hypothesis.stateful.invariant`
(:issue:`2149`).

Thanks to Benjamin Palmer for this bugfix!

4.45.0

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

This release supports :obj:`python:typing.Final` and :obj:`python:typing.TypedDict`
in :func:`~hypothesis.strategies.from_type`.

4.44.5

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

This patch disables our :pypi:`pytest` plugin when running on versions
of :pypi:`pytest` before 4.3, the oldest our plugin supports.
Note that at time of writing the Pytest developers only support 4.6 and later!

Hypothesis *tests* using :func:`given() <hypothesis.given>` work on any
test runner, but our integrations to e.g. avoid example database collisions
when combined with ``pytest.mark.parametrize`` eventually drop support
for obsolete versions.

4.44.4

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

This patch adds some internal comments and clarifications to the Hypothesis
implementation. There is no user-visible change.

4.44.3

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

This patch avoids importing test runners such as :pypi:`pytest`, :pypi:`unittest2`,
or :pypi:`nose` solely to access their special "skip test" exception types -
if the module is not in :obj:`sys.modules`, the exception can't be raised anyway.

This fixes a problem where importing an otherwise unused module could cause
spurious errors due to import-time side effects (and possibly ``-Werror``).

Page 95 of 194

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.