Hypothesis

Latest version: v6.99.13

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

Scan your dependencies

Page 46 of 194

6.27.0

-------------------

This release teaches Hypothesis' multiple-error reporting to format tracebacks
using :pypi:`pytest` or :pypi:`better-exceptions`, if they are installed and
enabled (:issue:`3116`).

6.26.0

-------------------

Did you know that of the 2\ :superscript:`64` possible floating-point numbers,
2\ :superscript:`53` of them are ``nan`` - and Python prints them all the same way?

While nans *usually* have all zeros in the sign bit and mantissa, this
`isn't always true <https://wingolog.org/archives/2011/05/18/value-representation-in-javascript-implementations>`__,
and :wikipedia:`'signaling' nans might trap or error <NaNSignaling_NaN>`.
To help distinguish such errors in e.g. CI logs, Hypothesis now prints ``-nan`` for
negative nans, and adds a comment like `` Saw 3 signaling NaNs`` if applicable.

6.25.0

-------------------

This release adds special filtering logic to make a few special cases
like ``s.map(lambda x: x)`` and ``lists().filter(len)`` more efficient
(:issue:`2701`).

6.24.6

-------------------

This patch makes :func:`~hypothesis.strategies.floats` generate
:wikipedia:`"subnormal" floating point numbers <Subnormal_number>`
more often, as these rare values can have strange interactions with
`unsafe compiler optimisations like -ffast-math
<https://simonbyrne.github.io/notes/fastmath/#flushing_subnormals_to_zero>`__
(:issue:`2976`).

6.24.5

-------------------

This patch fixes a rare internal error in the :func:`~hypothesis.strategies.datetimes`
strategy, where the implementation of ``allow_imaginary=False`` crashed when checking
a time during the skipped hour of a DST transition *if* the DST offset is negative -
only true of ``Europe/Dublin``, who we presume have their reasons - and the ``tzinfo``
object is a :pypi:`pytz` timezone (which predates :pep:`495`).

6.24.4

-------------------

This patch gives Hypothesis it's own internal :class:`~random.Random` instance,
ensuring that test suites which reset the global random state don't induce
weird correlations between property-based tests (:issue:`2135`).

Page 46 of 194

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.