v0.29.0
Full Changelog: v0.28.0...v0.29.0
Features
- Add
trio.lowlevel.in_trio_runandtrio.lowlevel.in_trio_taskand document the semantics (and differences) thereof. (#2757) - If
trio.testing.RaisesGroupdoes not get the expected exceptions it now raises anAssertionErrorwith a helpful message, instead of letting the raised exception/group fall through. The raised exception is available in the__context__of theAssertionErrorand can be seen in the traceback. (#3145)
Bugfixes
- Clear Trio's cache of worker threads upon
os.fork. (#2764)
Miscellaneous internal changes
-
Stop using ctypes to mutate tracebacks for
strict_exception_groups=False's exception collapsing. (#405) -
Fixed spelling error in Windows error code enum for
ERROR_INVALID_PARAMETER. (#3166) -
Publicly re-export
__version__for type checking purposes. (#3186) -
The typing of
trio.abc.HostnameResolver.getaddrinfohas been corrected to match that of the stdlibsocket.getaddrinfo, which was updated in mypy 1.15 (via a typeshed update) to include the possibility oftuple[int, bytes]for thesockaddrfield of the result. This happens in situations where Python was compiled with--disable-ipv6.Additionally, the static typing of
trio.to_thread.run_sync,trio.from_thread.runandtrio.from_thread.run_synchas been improved and should reflect the underlying function being run. (#3201)