Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 177 of 195

3.11.3

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

This is a bugfix release: Hypothesis no longer emits a warning if you try to
use :func:`~hypothesis.strategies.sampled_from` with
:class:`python:collections.OrderedDict`. (:issue:`688`)

3.11.2

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

This is a documentation release. Several outdated snippets have been updated
or removed, and many cross-references are now hyperlinks.

3.11.1

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

This is a minor ergonomics release. Tracebacks shown by pytest no longer
include Hypothesis internals for test functions decorated with :func:`given <hypothesis.given>`.

3.11.0

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

This is a feature release, adding datetime-related strategies to the core strategies.

:func:`~hypothesis.extra.pytz.timezones` allows you to sample pytz timezones from
the Olsen database. Use directly in a recipe for tz-aware datetimes, or
compose with :func:`~hypothesis.strategies.none` to allow a mix of aware and naive output.

The new :func:`~hypothesis.strategies.dates`, :func:`~hypothesis.strategies.times`,
:func:`~hypothesis.strategies.datetimes`, and :func:`~hypothesis.strategies.timedeltas`
strategies are all constrained by objects of their type.
This means that you can generate dates bounded by a single day
(i.e. a single date), or datetimes constrained to the microsecond.

:func:`~hypothesis.strategies.times` and :func:`~hypothesis.strategies.datetimes`
take an optional ``timezones=`` argument, which
defaults to :func:`~hypothesis.strategies.none` for naive times. You can use our extra strategy
based on pytz, or roll your own timezones strategy with dateutil or even
the standard library.

The old ``dates``, ``times``, and ``datetimes`` strategies in
``hypothesis.extra.datetimes`` are deprecated in favor of the new
core strategies, which are more flexible and have no dependencies.

3.10.0

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

Hypothesis now uses :func:`python:inspect.getfullargspec` internally.
On Python 2, there are no visible changes.

On Python 3 :func:`given <hypothesis.given>` and :func:`composite <hypothesis.strategies.composite>`
now preserve :pep:`3107` annotations on the
decorated function. Keyword-only arguments are now either handled correctly
(e.g. :func:`composite <hypothesis.strategies.composite>`), or caught in validation instead of silently discarded
or raising an unrelated error later (e.g. :func:`given <hypothesis.given>`).

3.9.1

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

This is a bugfix release: the default field mapping for a DateTimeField in the
Django extra now respects the ``USE_TZ`` setting when choosing a strategy.

Page 177 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.