v0.25.0
Full Changelog: v0.24.0...v0.25.0
Breaking changes
-
The
strict_exception_groups
parameter now defaults toTrue
intrio.run
andtrio.lowlevel.start_guest_run
.trio.open_nursery
still 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_nursery
will change.
This is unfortunately very tricky to change with a deprecation period, as raising aDeprecationWarning
wheneverstrict_exception_groups
is 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
StopAsyncIteration
orStopIteration
inside a nursery, then python will not recognize wrapped instances of those for stopping iteration. -
trio.run_process
is now documented that it can raise anExceptionGroup
. It previously could do this in very rare circumstances, but withstrict_exception_groups
set toTrue
it will now do so whenever exceptions occur indeliver_cancel
or 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=True
there are cases now where anExceptionGroup
is 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) -
Path
is now a subclass ofpathlib.PurePath
, allowing it to interoperate with other standard
pathlib
types.Instantiating
Path
now returns a concrete platform-specific subclass, one ofPosixPath
or
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)