Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 97 of 210

5.10.5

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

If you have :pypi:`Django` installed but don't use it, this patch will make
``import hypothesis`` a few hundred milliseconds faster (e.g. 0.704s -> 0.271s).

Thanks to :pypi:`importtime-waterfall` for highlighting this problem and
`Jake Vanderplas <https://twitter.com/jakevdp/status/1130983439862181888>`__ for
the solution - it's impossible to misuse code from a module you haven't imported!

5.10.4

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

This patch improves the internals of :func:`~hypothesis.strategies.builds` type
inference, to handle recursive forward references in certain dataclasses.
This is useful for e.g. :pypi:`hypothesmith`'s forthcoming :pypi:`LibCST <libcst>` mode.

5.10.3

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

This release reverses the order in which some operations are tried during shrinking.
This should generally be a slight performance improvement, but most tests are unlikely to notice much difference.

5.10.2

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

This patch fixes :issue:`2406`, where use of :obj:`pandas:pandas.Timestamp`
objects as bounds for the :func:`~hypothesis.strategies.datetimes` strategy
caused an internal error. This bug was introduced in :ref:`version 5.8.1 <v5.8.2>`.

5.10.1

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

This release is a small internal refactoring to how shrinking interacts with :ref:`targeted property-based testing <targeted-search>` that should have no user user visible impact.

5.10.0

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

This release improves our support for datetimes and times around DST transitions.

:func:`~hypothesis.strategies.times` and :func:`~hypothesis.strategies.datetimes`
are now sometimes generated with ``fold=1``, indicating that they represent the
second occurrence of a given wall-time when clocks are set backwards.
This may be set even when there is no transition, in which case the ``fold``
value should be ignored.

For consistency, timezones provided by the :pypi:`pytz` package can now
generate imaginary times (such as the hour skipped over when clocks 'spring forward'
to daylight saving time, or during some historical timezone transitions).
All other timezones have always supported generation of imaginary times.

If you prefer the previous behaviour, :func:`~hypothesis.strategies.datetimes`
now takes an argument ``allow_imaginary`` which defaults to ``True`` but
can be set to ``False`` for any timezones strategy.

Page 97 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.