Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 30 of 210

6.85.1

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

This patch switches some of our type annotations to use :obj:`typing.Literal`
when only a few specific values are allowed, such as UUID or IP address versions.

6.85.0

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

This release deprecates the old whitelist/blacklist arguments
to :func:`~hypothesis.strategies.characters`, in favor of
include/exclude arguments which more clearly describe their
effects on the set of characters which can be generated.

You can :ref:`use Hypothesis' codemods <codemods>` to automatically
upgrade to the new argument names. In a future version, the old
names will start to raise a ``DeprecationWarning``.

6.84.3

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

This patch automatically disables the :obj:`~hypothesis.HealthCheck.differing_executors`
health check for methods which are also pytest parametrized tests, because
those were mostly false alarms (:issue:`3733`).

6.84.2

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

Building on recent releases, :func:`~hypothesis.strategies.characters`
now accepts _any_ ``codec=``, not just ``"utf-8"`` and ``"ascii"``.

This includes standard codecs from the :mod:`codecs` module and their
aliases, platform specific and user-registered codecs if they are
available, and `python-specific text encodings
<https://docs.python.org/3/library/codecs.html#python-specific-encodings>`__
(but not text transforms or binary transforms).

6.84.1

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

This patch by Reagan Lee makes ``st.text(...).filter(str.isidentifier)``
return an efficient custom strategy (:issue:`3480`).

6.84.0

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

The :func:`~hypothesis.strategies.from_regex` strategy now takes an optional
``alphabet=characters(codec="utf-8")`` argument for unicode strings, like
:func:`~hypothesis.strategies.text`.

This offers more and more-consistent control over the generated strings,
removing previously-hard-coded limitations. With ``fullmatch=False`` and
``alphabet=characters()``, surrogate characters are now possible in leading
and trailing text as well as the body of the match. Negated character classes
such as ``[^A-Z]`` or ``\S`` had a hard-coded exclusion of control characters
and surrogate characters; now they permit anything in ``alphabet=`` consistent
with the class, and control characters are permitted by default.

Page 30 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.