File pyopenssl-25-1-compatibility.patch of Package python-trio
From c6e15249dc0cfe29bdbe6829ae4a3891aa147aa3 Mon Sep 17 00:00:00 2001
From: A5rocks <git@helvetica.moe>
Date: Fri, 20 Jun 2025 10:13:37 -0400
Subject: [PATCH] Move away from RaisesContext
---
src/trio/_tests/test_testing_raisesgroup.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/trio/_tests/test_testing_raisesgroup.py b/src/trio/_tests/test_testing_raisesgroup.py
index b3fe2ae755..a42566d3ec 100644
--- a/src/trio/_tests/test_testing_raisesgroup.py
+++ b/src/trio/_tests/test_testing_raisesgroup.py
@@ -14,9 +14,6 @@
if sys.version_info < (3, 11):
from exceptiongroup import BaseExceptionGroup, ExceptionGroup
-if TYPE_CHECKING:
- from _pytest.python_api import RaisesContext
-
def wrap_escape(s: str) -> str:
return "^" + re.escape(s) + "$"
@@ -24,7 +21,7 @@ def wrap_escape(s: str) -> str:
def fails_raises_group(
msg: str, add_prefix: bool = True
-) -> RaisesContext[AssertionError]:
+) -> pytest.RaisesExc[AssertionError]:
assert (
msg[-1] != "\n"
), "developer error, expected string should not end with newline"