Full Changelog: v0.25.1...v0.26.0
Features
-
Added an interactive interpreter
python -m trio
.This makes it easier to try things and experiment with trio in the a Python repl.
Use theawait
keyword without needing to calltrio.run()
$ python -m trio
Trio 0.26.0, Python 3.10.6
Use "await" directly instead of "trio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import trio
>>> await trio.sleep(1); print("hi") # prints after one second
hi
See interactive debugging for further detail. (#2972)
trio.testing.RaisesGroup
can now catch an unwrapped exception withunwrapped=True
. This means that the behaviour ofexcept*
can be fully replicated in combination withflatten_subgroups=True
(formerlystrict=False
). (#2989)
Bugfixes
- Fixed a bug where
trio.testing.RaisesGroup(..., strict=False)
would check the number of exceptions in the raisedExceptionGroup
before flattening subgroups, leading to incorrectly failed matches.
It now properly supports end ($
) regex markers in thematch
message, by no longer including " (x sub-exceptions)" in the string it matches against. (#2989)
Deprecations and removals
- Deprecated
strict
parameter fromtrio.testing.RaisesGroup
, previous functionality ofstrict=False
is now inflatten_subgroups=True
. (#2989)