From b70f271dd9ba089cf9826bc11e12b1f1a919295f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Mon, 17 Jan 2022 01:24:48 +0200 Subject: [PATCH] Require exceptiongroup unconditionally for tests --- test-requirements.in | 1 + test-requirements.txt | 2 ++ trio/_core/tests/test_run.py | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test-requirements.in b/test-requirements.in index 99854204d6..75e69f2c9b 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -7,6 +7,7 @@ trustme # for the ssl tests pylint # for pylint finding all symbols tests jedi # for jedi code completion tests cryptography>=36.0.0 # 35.0.0 is transitive but fails +exceptiongroup # for catch() # Tools black; implementation_name == "cpython" diff --git a/test-requirements.txt b/test-requirements.txt index f1162efdb0..15f8d58b91 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -32,6 +32,8 @@ cryptography==36.0.1 # trustme decorator==5.1.0 # via ipython +exceptiongroup==1.0.0rc1 + # via -r test-requirements.in flake8==4.0.1 # via -r test-requirements.in idna==3.3 diff --git a/trio/_core/tests/test_run.py b/trio/_core/tests/test_run.py index c9d73f4c9a..0c563d5310 100644 --- a/trio/_core/tests/test_run.py +++ b/trio/_core/tests/test_run.py @@ -16,6 +16,7 @@ import outcome import sniffio import pytest +from exceptiongroup import catch from .tutil import ( slow, @@ -38,7 +39,7 @@ ) if sys.version_info < (3, 11): - from exceptiongroup import BaseExceptionGroup, ExceptionGroup, catch + from exceptiongroup import BaseExceptionGroup, ExceptionGroup # slightly different from _timeouts.sleep_forever because it returns the value