Repository: HypothesisWorks/hypothesis

Issue:
Update pinned dependencies
Automatically update pinned dependencies


Discussion:

Resolving patch:
diff --git a/hypothesis-python/src/hypothesis/internal/escalation.py b/hypothesis-python/src/hypothesis/internal/escalation.py
--- a/hypothesis-python/src/hypothesis/internal/escalation.py
+++ b/hypothesis-python/src/hypothesis/internal/escalation.py
@@ -126,9 +126,13 @@ def get_interesting_origin(exception):
 
 def _get_exceptioninfo():
     # ExceptionInfo was moved to the top-level namespace in Pytest 7.0
-    for module in ["pytest", "_pytest._code"]:
+    if "pytest" in sys.modules:
         with contextlib.suppress(Exception):
-            return sys.modules[module].ExceptionInfo
+            # From Pytest 7, __init__ warns on direct calls.
+            return sys.modules["pytest"].ExceptionInfo.from_exc_info
+    if "_pytest._code" in sys.modules:  # pragma: no cover  # old versions only
+        with contextlib.suppress(Exception):
+            return sys.modules["_pytest._code"].ExceptionInfo
     return None  # pragma: no cover  # coverage tests always use pytest
 
 
diff --git a/tooling/src/hypothesistooling/__main__.py b/tooling/src/hypothesistooling/__main__.py
--- a/tooling/src/hypothesistooling/__main__.py
+++ b/tooling/src/hypothesistooling/__main__.py
@@ -16,12 +16,13 @@
 from glob import glob
 from urllib.parse import urlparse
 
+import requests
+from coverage.config import CoverageConfig
+
 import hypothesistooling as tools
 import hypothesistooling.projects.conjecturerust as cr
 import hypothesistooling.projects.hypothesispython as hp
 import hypothesistooling.projects.hypothesisruby as hr
-import requests
-from coverage.config import CoverageConfig
 from hypothesistooling import installers as install, releasemanagement as rm
 from hypothesistooling.scripts import pip_tool
 
diff --git a/tooling/src/hypothesistooling/projects/hypothesispython.py b/tooling/src/hypothesistooling/projects/hypothesispython.py
--- a/tooling/src/hypothesistooling/projects/hypothesispython.py
+++ b/tooling/src/hypothesistooling/projects/hypothesispython.py
@@ -14,8 +14,9 @@
 import subprocess
 import sys
 
-import hypothesistooling as tools
 import requests
+
+import hypothesistooling as tools
 from hypothesistooling import releasemanagement as rm
 
 PACKAGE_NAME = "hypothesis-python"


Test patch:
diff --git a/whole-repo-tests/test_deploy.py b/whole-repo-tests/test_deploy.py
--- a/whole-repo-tests/test_deploy.py
+++ b/whole-repo-tests/test_deploy.py
@@ -10,8 +10,9 @@
 
 import os
 
-import hypothesistooling as tools
 import pytest
+
+import hypothesistooling as tools
 from hypothesistooling import __main__ as main, releasemanagement as rm
 
 
diff --git a/whole-repo-tests/test_release_files.py b/whole-repo-tests/test_release_files.py
--- a/whole-repo-tests/test_release_files.py
+++ b/whole-repo-tests/test_release_files.py
@@ -8,8 +8,9 @@
 # v. 2.0. If a copy of the MPL was not distributed with this file, You can
 # obtain one at https://mozilla.org/MPL/2.0/.
 
-import hypothesistooling as tools
 import pytest
+
+import hypothesistooling as tools
 from hypothesistooling import releasemanagement as rm
 
 
diff --git a/whole-repo-tests/test_release_management.py b/whole-repo-tests/test_release_management.py
--- a/whole-repo-tests/test_release_management.py
+++ b/whole-repo-tests/test_release_management.py
@@ -9,6 +9,7 @@
 # obtain one at https://mozilla.org/MPL/2.0/.
 
 import pytest
+
 from hypothesistooling.releasemanagement import (
     bump_version_info,
     parse_release_file_contents,
diff --git a/whole-repo-tests/test_type_hints.py b/whole-repo-tests/test_type_hints.py
--- a/whole-repo-tests/test_type_hints.py
+++ b/whole-repo-tests/test_type_hints.py
@@ -12,6 +12,7 @@
 import subprocess
 
 import pytest
+
 from hypothesistooling.projects.hypothesispython import PYTHON_SRC
 from hypothesistooling.scripts import pip_tool, tool_path