Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hypothesis to 6.3.2 #2793

Closed
wants to merge 1 commit into from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates hypothesis from 6.0.2 to 6.3.2.

Changelog

6.3.2

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

This patch enables :func:`~hypothesis.strategies.register_type_strategy` for subclasses of
:class:`python:typing.TypedDict`.  Previously, :func:`~hypothesis.strategies.from_type`
would ignore the registered strategy (:issue:`2872`).

Thanks to Ilya Lebedev for identifying and fixing this bug!

6.3.1

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

This release lays the groundwork for automatic rewriting of simple filters,
for example converting ``integers().filter(lambda x: x > 9)`` to
``integers(min_value=10)``.

Note that this is **not supported yet**, and we will continue to recommend
writing the efficient form directly wherever possible - predicate rewriting
is provided mainly for the benefit of downstream libraries which would
otherwise have to implement it for themselves (e.g. :pypi:`pandera` and
:pypi:`icontract-hypothesis`).  See :issue:`2701` for details.

6.3.0

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

The Hypothesis :pypi:`pytest` plugin now requires pytest version 4.6 or later.
If the plugin detects an earlier version of pytest, it will automatically
deactivate itself.

`(4.6.x is the earliest pytest branch that still accepts community bugfixes.)
<https://docs.pytest.org/en/stable/py27-py34-deprecation.html>`__

Hypothesis-based tests should continue to work in earlier versions of
pytest, but enhanced integrations provided by the plugin
(such as ``--hypothesis-show-statistics`` and other command-line flags)
will no longer be available in obsolete pytest versions.

6.2.0

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

If you use :pypi:`pytest-html`, Hypothesis now includes the
:ref:`summary statistics for each test <statistics>` in the HTML report,
whether or not the ``--hypothesis-show-statistics`` argument was passed
to show them in the command-line output.

6.1.1

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

This patch updates our automatic code formatting to use :pypi:`shed`,
which includes :pypi:`autoflake`, :pypi:`black`, :pypi:`isort`, and
:pypi:`pyupgrade` (:issue:`2780`).

6.1.0

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

This release teaches Hypothesis to distinguish between errors based on the
`__cause__ or __context__ of otherwise identical exceptions
<https://docs.python.org/3/library/exceptions.html>`__, which is particularly
useful when internal errors can be wrapped by a library-specific or semantically
appropriate exception such as:

.. code-block:: python

 try:
     do_the_thing(foo, timeout=10)
 except Exception as err:
     raise FooError("Failed to do the thing") from err

Earlier versions of Hypothesis only see the ``FooError``, while we can now
distinguish a ``FooError`` raised because of e.g. an internal assertion from
one raised because of a ``TimeoutExceeded`` exception.

6.0.4

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

This release prevents a race condition inside :func:`~hypothesis.strategies.recursive` strategies.
The race condition occurs when the same :func:`~hypothesis.strategies.recursive` strategy is shared among tests
that are running in multiple threads (:issue:`2717`).

6.0.3

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

This patch improves the type annotations for :func:`~hypothesis.strategies.one_of`,
by adding overloads to handle up to five distinct arguments as
:class:`~python:typing.Union` before falling back to :class:`~python:typing.Any`,
as well as annotating the ``|`` (``__or__``) operator for strategies (:issue:`2765`).
Links

@pyup-bot
Copy link
Collaborator Author

Closing this in favor of #2799

@pyup-bot pyup-bot closed this Feb 27, 2021
@Harmon758 Harmon758 deleted the pyup-update-hypothesis-6.0.2-to-6.3.2 branch February 27, 2021 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant