trio icon indicating copy to clipboard operation
trio copied to clipboard

replace `trio.testing.RaisesGroup` with `pytest.RaisesGroup`

Open jakkdl opened this issue 4 months ago • 1 comments

pytest 8.4 released RaisesGroup, and it's already better than trio.testing.RaisesGroup with more informative error messages. I think we can get away with simply aliasing trio.testing.RaisesGroup to pytest.RaisesGroup and trio.testing.Matcher to pytest.RaisesExc, maybe with a short period where we raise a DeprecationWarning if somebody accesses them without pytest available.

We could also start raising warnings straight away for accessing them, given that there's not much reason for keeping them around.

jakkdl avatar Sep 03 '25 17:09 jakkdl

IMO it's easiest to mark them as deprecated attributes and not have to worry about interface differences with pytest/aliasing/etc.

A5rocks avatar Sep 03 '25 18:09 A5rocks