Repository: pydantic/pydantic

Issue:
build(deps): bump hypothesis from 5.44.0 to 6.3.0
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 5.44.0 to 6.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/HypothesisWorks/hypothesis/releases">hypothesis's releases</a>.</em></p>
<blockquote>
<h2>Hypothesis for Python - version 6.3.0</h2>
<p>The Hypothesis pytest plugin now requires pytest version 4.6 or later.
If the plugin detects an earlier version of pytest, it will
automatically deactivate itself.</p>
<p>(4.6.x is the earliest pytest branch that still accepts community
bugfixes.)</p>
<p>Hypothesis-based tests should continue to work in earlier versions of
pytest, but enhanced integrations provided by the plugin (such as &quot;--
hypothesis-show-statistics&quot; and other command-line flags) will no
longer be available in obsolete pytest versions.</p>
<p><em><a href="https://hypothesis.readthedocs.io/en/latest/changes.html#v6-3-0">The canonical version of these notes (with links) is on readthedocs.</a></em></p>
<h2>Hypothesis for Python - version 6.2.0</h2>
<p>If you use pytest-html, Hypothesis now includes the summary statistics
for each test in the HTML report, whether or not the &quot;--hypothesis-
show-statistics&quot; argument was passed to show them in the command-line
output.</p>
<p><em><a href="https://hypothesis.readthedocs.io/en/latest/changes.html#v6-2-0">The canonical version of these notes (with links) is on readthedocs.</a></em></p>
<h2>Hypothesis for Python - version 6.1.1</h2>
<p>This patch updates our automatic code formatting to use shed, which
includes autoflake, black, isort, and pyupgrade (issue <a href="https://github-redirect.dependabot.com/HypothesisWorks/hypothesis/issues/2780">#2780</a>).</p>
<p><em><a href="https://hypothesis.readthedocs.io/en/latest/changes.html#v6-1-1">The canonical version of these notes (with links) is on readthedocs.</a></em></p>
<h2>Hypothesis for Python - version 6.1.0</h2>
<p>This release teaches Hypothesis to distinguish between errors based on
the <strong>cause</strong> or <strong>context</strong> of otherwise identical exceptions, which
is particularly useful when internal errors can be wrapped by a
library-specific or semantically appropriate exception such as:</p>
<p>try:
do_the_thing(foo, timeout=10)
except Exception as err:
raise FooError(&quot;Failed to do the thing&quot;) from err</p>
<p>Earlier versions of Hypothesis only see the &quot;FooError&quot;, while we can
now distinguish a &quot;FooError&quot; raised because of e.g. an internal
assertion from one raised because of a &quot;TimeoutExceeded&quot; exception.</p>
<p><em><a href="https://hypothesis.readthedocs.io/en/latest/changes.html#v6-1-0">The canonical version of these notes (with links) is on readthedocs.</a></em></p>
<h2>Hypothesis for Python - version 6.0.4</h2>
<p>This release prevents a race condition inside &quot;recursive()&quot;
strategies. The race condition occurs when the same &quot;recursive()&quot;
strategy is shared among tests that are running in multiple threads</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/f1ca0a33d01fa2e37c747ec88853fdc82e3a17e6"><code>f1ca0a3</code></a> Bump hypothesis-python version to 6.3.0 and update changelog</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/1411b1c9c31abfaefe11a8047c2543a0b85f3aba"><code>1411b1c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/HypothesisWorks/hypothesis/issues/2865">#2865</a> from Zalathar/pytest-46</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/23478b39d759cb048368a1cb190609279f60c14e"><code>23478b3</code></a> Bump required pytest version to 4.6</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/d76062140369488ccff387d6bc78cf2c5995d80b"><code>d760621</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/HypothesisWorks/hypothesis/issues/2858">#2858</a> from HypothesisWorks/create-pull-request/patch</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/c718331dd38e0a73a0f8290999c32c67f7d315dc"><code>c718331</code></a> Update pinned dependencies</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/fbe82e8616f9003906787bb559a0d9118bb16d43"><code>fbe82e8</code></a> Bump hypothesis-python version to 6.2.0 and update changelog</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/36acea8def0a2e4883d4af6e306133ed0f83734a"><code>36acea8</code></a> Update test_interesting_origin.py</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/eee52451a84ff9181de7ae491302b1ec4a764613"><code>eee5245</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/HypothesisWorks/hypothesis/issues/2854">#2854</a> from Zac-HD/html-statistics-report</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/6188ce2596c445c968db352bcbe21385eb1ecd82"><code>6188ce2</code></a> Report stats in HTML</li>
<li><a href="https://github.com/HypothesisWorks/hypothesis/commit/0058663f1541ed40ad63810e8733bc5f6e0a9c2a"><code>0058663</code></a> Document new integrations</li>
<li>Additional commits viewable in <a href="https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-5.44.0...hypothesis-python-6.3.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hypothesis&package-manager=pip&previous-version=5.44.0&new-version=6.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Discussion:

Resolving patch:
diff --git a/pydantic/_hypothesis_plugin.py b/pydantic/_hypothesis_plugin.py
--- a/pydantic/_hypothesis_plugin.py
+++ b/pydantic/_hypothesis_plugin.py
@@ -152,11 +152,11 @@ def add_luhn_digit(card_number: str) -> str:
 st.register_type_strategy(pydantic.IPvAnyAddress, st.ip_addresses())
 st.register_type_strategy(
     pydantic.IPvAnyInterface,
-    st.from_type(ipaddress.IPv4Interface) | st.from_type(ipaddress.IPv6Interface),
+    st.from_type(ipaddress.IPv4Interface) | st.from_type(ipaddress.IPv6Interface),  # type: ignore[arg-type]
 )
 st.register_type_strategy(
     pydantic.IPvAnyNetwork,
-    st.from_type(ipaddress.IPv4Network) | st.from_type(ipaddress.IPv6Network),
+    st.from_type(ipaddress.IPv4Network) | st.from_type(ipaddress.IPv6Network),  # type: ignore[arg-type]
 )
 
 # We hook into the con***() functions and the ConstrainedNumberMeta metaclass,
@@ -212,7 +212,6 @@ def inner(f):  # type: ignore
 # Type-to-strategy resolver functions
 
 
-@resolves(pydantic.Json)
 @resolves(pydantic.JsonWrapper)
 def resolve_json(cls):  # type: ignore[no-untyped-def]
     try:
@@ -221,7 +220,7 @@ def resolve_json(cls):  # type: ignore[no-untyped-def]
         finite = st.floats(allow_infinity=False, allow_nan=False)
         inner = st.recursive(
             base=st.one_of(st.none(), st.booleans(), st.integers(), finite, st.text()),
-            extend=lambda x: st.lists(x) | st.dictionaries(st.text(), x),
+            extend=lambda x: st.lists(x) | st.dictionaries(st.text(), x),  # type: ignore
         )
     return st.builds(
         json.dumps,
@@ -347,3 +346,4 @@ def resolve_constr(cls):  # type: ignore[no-untyped-def]  # pragma: no cover
 for typ in pydantic.types._DEFINED_TYPES:
     _registered(typ)
 pydantic.types._registered = _registered
+st.register_type_strategy(pydantic.Json, resolve_json)


Test patch:
diff --git a/tests/requirements-linting.txt b/tests/requirements-linting.txt
--- a/tests/requirements-linting.txt
+++ b/tests/requirements-linting.txt
@@ -1,7 +1,7 @@
 black==20.8b1
 flake8==3.8.4
 flake8-quotes==3.2.0
-hypothesis==5.44.0
+hypothesis==6.3.0
 isort==5.7.0
 mypy==0.800
 pycodestyle==2.6.0
diff --git a/tests/requirements-testing.txt b/tests/requirements-testing.txt
--- a/tests/requirements-testing.txt
+++ b/tests/requirements-testing.txt
@@ -1,5 +1,5 @@
 coverage==5.4
-hypothesis==5.44.0
+hypothesis==6.3.0
 # pin importlib-metadata as upper versions need typing-extensions to work if on python < 3.8
 importlib-metadata==3.1.0;python_version<"3.8"
 mypy==0.800
diff --git a/tests/test_hypothesis_plugin.py b/tests/test_hypothesis_plugin.py
--- a/tests/test_hypothesis_plugin.py
+++ b/tests/test_hypothesis_plugin.py
@@ -63,7 +63,6 @@ class NumbersModel(pydantic.BaseModel):
         nonnegfloat: pydantic.NonNegativeFloat
 
     class JsonModel(pydantic.BaseModel):
-        json_any: pydantic.Json
         json_int: pydantic.Json[int]
         json_float: pydantic.Json[float]
         json_str: pydantic.Json[str]