Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] support trio's new exception groups, bump min trio rev to 0.25.0 #147

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

axiomiety
Copy link
Contributor

Fixes #146.

Technically it's only the tests that are impacted but for completeness I also bumped the trio version on docs-requirements.txt.

@axiomiety axiomiety force-pushed the tests-exception-groups branch from b811211 to 5fe4290 Compare April 19, 2024 01:58
@@ -0,0 +1 @@
In 0.24.0 ``trio`` introduced `~trio.testing.RaisesGroup` in preparation for changing the default of ``strict_exception_groups`` to ``True``. 0.25.0 made this the new default which broke a number of tests that relied on ``pytest.raises`` - this uplifts the tests to using `~trio.testing.RaisesGroup`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a user-visible change (it only affected the tests), so I think it should be a misc ("Miscellaneous internal changes") type newsfragment.

The thing about RaisesGroup is not really relevant to what you fixed (you used it in the implementation but it's not the basis of what broke), and mentioning trio 0.24.0 is confusing when this is a change prompted by 0.25.0. I think this can be just "Updated test suite to cope with Trio 0.25.0 and later defaulting strict_exception_groups to True. Trio 0.25.0 is now required to run the tests, although trio-asyncio itself still supports older versions."

@axiomiety axiomiety force-pushed the tests-exception-groups branch from 5fe4290 to cdedb5b Compare April 19, 2024 02:33
@@ -0,0 +1 @@
Updated test suite to cope with Trio 0.25.0 and later defaulting ``strict_exception_groups`` to ``True``. Trio 0.25.0 is now required to run the tests, although `~trio-asyncio` itself still supports older versions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the failing docs build here - single backticks in ReST are a cross-reference, and there's no entity named "trio-asyncio". (Also, there's no need for the tilde; the purpose of that is to not print the portion of the xref before the final dot, but there are no dots here.) You can reference the module "trio_asyncio", or double the backticks for fixed-width font without a cross-reference, but I would just drop the backticks and let trio-asyncio be like a normal word; that's the style we try to use in the rest of the documentation.

@axiomiety axiomiety force-pushed the tests-exception-groups branch from cdedb5b to 91c7360 Compare April 19, 2024 02:41
@oremanj oremanj merged commit dde84b3 into python-trio:master Apr 19, 2024
25 checks passed
@oremanj
Copy link
Member

oremanj commented Apr 19, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Properly support ExceptionGroup wrapping in trio 0.25.0+
2 participants