v0.25.0
Full Changelog: v0.24.0...v0.25.0
Breaking changes
-
The
strict_exception_groupsparameter now defaults toTrueintrio.runandtrio.lowlevel.start_guest_run.trio.open_nurserystill defaults to the same value as was specified intrio.run/trio.lowlevel.start_guest_run, but if you didn't specify it there then all subsequent calls totrio.open_nurserywill change.
This is unfortunately very tricky to change with a deprecation period, as raising aDeprecationWarningwheneverstrict_exception_groupsis not specified would raise a lot of unnecessary warnings.Notable side effects of changing code to run with
strict_exception_groups==True-
If an iterator raises
StopAsyncIterationorStopIterationinside a nursery, then python will not recognize wrapped instances of those for stopping iteration. -
trio.run_processis now documented that it can raise anExceptionGroup. It previously could do this in very rare circumstances, but withstrict_exception_groupsset toTrueit will now do so whenever exceptions occur indeliver_cancelor with problems communicating with the subprocess.- Errors in opening the process is now done outside the internal nursery, so if code previously ran with
strict_exception_groups=Truethere are cases now where anExceptionGroupis no longer added.
- Errors in opening the process is now done outside the internal nursery, so if code previously ran with
-
trio.TrioInternalError.__cause__might be wrapped in one or moreExceptionGroups <ExceptionGroup>(#2786)
-
Features
-
Add
trio.testing.wait_all_threads_completed, which blocks until no threads are running tasks. This is intended to be used in the same way astrio.testing.wait_all_tasks_blocked. (#2937) -
Pathis now a subclass ofpathlib.PurePath, allowing it to interoperate with other standard
pathlibtypes.Instantiating
Pathnow returns a concrete platform-specific subclass, one ofPosixPathor
WindowsPath, matching the behavior ofpathlib.Path. (#2959)
Bugfixes
- The pthread functions are now correctly found on systems using vanilla versions of musl libc. (#2939)
Miscellaneous internal changes
- use the regular readme for the PyPI long_description (#2866)