From 52518720e63e504a36d157e9ed66c7e59a23ae11 Mon Sep 17 00:00:00 2001 From: Mike Nerone Date: Sun, 2 Mar 2025 12:38:55 -0600 Subject: [PATCH 1/3] fix RaisesGroup(strict=...) in tests, removed in trio 0.27 fixes #154 --- test-requirements.txt | 2 +- tests/test_misc.py | 4 ++-- tests/test_trio_asyncio.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index bb660a4..05552c5 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,4 +3,4 @@ pytest-cov pytest-trio outcome pytest-timeout -trio >= 0.25.0 +trio >= 0.26.0 diff --git a/tests/test_misc.py b/tests/test_misc.py index 8724149..0c178eb 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -333,9 +333,9 @@ def collect_exceptions(loop, context): ) expected = [ValueError("hi"), ValueError("lo"), KeyError(), IndexError()] await raise_in_aio_loop(expected[0]) - with trio.testing.RaisesGroup(SystemExit, strict=False): + with trio.testing.RaisesGroup(SystemExit, flatten_subgroups=True): await raise_in_aio_loop(SystemExit(0)) - with trio.testing.RaisesGroup(SystemExit, strict=False) as result: + with trio.testing.RaisesGroup(SystemExit, flatten_subgroups=True) as result: await raise_in_aio_loop(BaseExceptionGroup("", [expected[1], SystemExit()])) assert len(result.value.exceptions) == 1 diff --git a/tests/test_trio_asyncio.py b/tests/test_trio_asyncio.py index 045d0c1..dfbb7e5 100644 --- a/tests/test_trio_asyncio.py +++ b/tests/test_trio_asyncio.py @@ -124,7 +124,7 @@ async def test_cancel_loop_with_tasks(autojump_clock, shield, body_raises): if body_raises: catcher = trio.testing.RaisesGroup( - trio.testing.Matcher(ValueError, match="hi"), strict=False + trio.testing.Matcher(ValueError, match="hi"), flatten_subgroups=True ) else: catcher = contextlib.nullcontext() From d76f572589d879cb60560126209b889ac0f9ae7a Mon Sep 17 00:00:00 2001 From: Mike Nerone Date: Sun, 2 Mar 2025 12:46:32 -0600 Subject: [PATCH 2/3] fix: RTD now requires explicit config setting --- .readthedocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index 056c691..fd19713 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,4 +15,5 @@ python: - requirements: docs-requirements.txt sphinx: + configuration: docs/source/conf.py fail_on_warning: true From d74158d83a65a62552eb15279c19757852ddc364 Mon Sep 17 00:00:00 2001 From: Mike Nerone Date: Sun, 2 Mar 2025 12:50:50 -0600 Subject: [PATCH 3/3] fix: Sphinx no longer requires get_html_theme_path() call ...which breaks the docs build. --- docs/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index c68b4bc..f400d4b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -132,7 +132,6 @@ # html_theme_options. import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the