From 5be7c993d3e7bf45ca41f5f46dbd1d186c818ed5 Mon Sep 17 00:00:00 2001 From: Abduaziz Ziyodov Date: Tue, 23 Sep 2025 18:06:48 +0500 Subject: [PATCH] chore: deprecate `RaisesGroup` --- src/trio/testing/_raises_group.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/trio/testing/_raises_group.py b/src/trio/testing/_raises_group.py index 6001e4dab1..d3f930d9c6 100644 --- a/src/trio/testing/_raises_group.py +++ b/src/trio/testing/_raises_group.py @@ -15,6 +15,8 @@ from trio._util import final +from .._deprecate import warn_deprecated + if TYPE_CHECKING: import builtins @@ -531,6 +533,13 @@ def __init__( | None ) = None, ): + warn_deprecated( + "RaisesGroup", + version="0.31.0", + issue=3326, + instead="See https://docs.pytest.org/en/stable/reference/reference.html#pytest.RaisesGroup", + use_triodeprecationwarning=True, + ) # The type hint on the `self` and `check` parameters uses different formats # that are *very* hard to reconcile while adhering to the overloads, so we cast # it to avoid an error when passing it to super().__init__